Coder Social home page Coder Social logo

hulbertzeng / seadragonauv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robosub-ucr/seadragonauv

0.0 0.0 0.0 23 MB

Software of the SeadragonAUV for the 2019 RoboSub competition and testbed for the new AUVs.

CMake 1.97% Python 96.13% Shell 0.31% C++ 1.60%

seadragonauv's Introduction

Seadragon AUV

The Seadragon AUV (Autonomous Underwater Vehicle) is built by the University of California, Riverside's student organization: RoboSub UCR. The AUV was built to participate in the RoboNation's international competition, RoboSub. The AUV completes a number of aquatic objectives, such as object identification and interaction, dropping markers in targets, launching torpedoes at targets, and responding to sound signals, all without human interaction.

The RoboSub UCR's software team gives the submarine life, creating the artificial intelligence, computer vision, and software interface modules that allow the robot to see, sense, and move. We use Robot Operating System (ROS), Python, and C/C++ for our controls.

Getting Started

Prerequisites

  • Ubuntu 18.04
  • Python 2
  • C++
  • ROS Melodic
  • OpenCV

Installation

TODO

Setup a ROS workspace

TODO

Initializing ROS and nodes

  1. Initialize ROS master node (SD_CORE)
roscore
  1. Initialie AHRS node (SD_AHRS)
sudo chmod 666 /dev/ttyACM0
rosrun myahrs_driver myahrs_driver _port:=/dev/ttyACM0
  1. Initialize STM32 (SD_STM2)
sudo chmod 666 /dev/ttyACM2
rosrun rosserial_python serial_node.py _port:=/dev/ttyACM2
  1. Launch GUI (SD_LAUNCH)
roslaunch motor_controllers attitude_control.launch
  1. Find which device (jsX) is the Joystick:
ls /dev/input/
sudo jstest /dev/input/jsX
  1. Initialize Joystick node (SD_JOYSTICK)
ls -l /dev/input/jsX
sudo chmod a+rw /dev/input/jsX
rosparam set joy_node/dev "/dev/input/jsX"
rosrun joy joy_node

Note: A joystick controller must be connected to the computer.

Testing publishers, subscribers, and state machines

  1. Open a terminal on any directory and type roscore
  2. Go to the SeadragonAUV/Mission Control/competition_tasks/src/ folder.
  3. Open a new terminal for each of the following:
python master.py
python gateTask.py
python buoyTask.py
python torpedoTask.py

Each terminal should constantly print out a message similar to this one: [INFO] [123456789.987654]: State machine transitioning 'IDLE':'notready' --> 'IDLE'

  1. Open another terminal. Type of each these commands, each followed by ctrl-C:
rostopic pub /depth std_msgs/Int16 "data: 13"
rostopic pub /depth_control/state std_msgs/Int16 "data: 18"
rostopic pub /yaw_control/state std_msgs/Float64 "data: 1.57"
rostopic pub /gate_x std_msgs/Float64 "data: 200.0"
rostopic pub /gate_y std_msgs/Float64 "data: 150.0"
rostopic pub /gate_area std_msgs/Float64 "data: 15600.0"
rostopic pub /yaw_control/state std_msgs/Float64 "data: 1.57"
rostopic pub /yaw_control/state std_msgs/Float64 "data: 1.485"
rostopic pub /depth_control/state std_msgs/Int16 "data: 60"
rostopic pub /yaw_control/state std_msgs/Float64 "data: 0.765"

Tip: After typing the /topic_name and SPACE, you can press Tab twice to autofill the rest of the command. These commands will move the master.py state machine from IDLE --> EXECUTE and the gateTask.py state machine through all of its states.

Jetson + ROS tests

  1. Open a terminal and roscore
  2. Open another terminal and type:
sudo chmod 666 /dev/ttyACM0
rosrun rosserial_python serial_node.py /dev/ttyACM0

Note: if ACM0 doesnt work (an error occurs), try ACM1 or type ls /dev/ttyACM and tab to see which file # exists.

seadragonauv's People

Contributors

edcarrasco avatar rvazq002 avatar jackkolb avatar mnico005 avatar rkim216 avatar tdang93 avatar kride001 avatar manveer-saini avatar ineedasleep avatar malan006 avatar jshal001 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.