Skip to content

IllinoisAUV/robosub_2019

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

All the code that runs in the submarine.

Dev Environment Setup

Ros Setup

Go to ROS' website or use the following commands:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
sudo apt install ros-melodic-desktop-full

Then get dependencies

rosdep update

Set up your environment variables

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
source /opt/ros/melodic/setup.bash

Install python tools

sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential

Catkin Workspace

Make a directory for the project

mkdir sigbot
cd sigbot/

Install catkin tools

sudo apt install python-catkin-tools

Internalize the workspace

catkin_init_workspace

Creating a src directory for the repositories

Make a src folder

mkdir src
cd src

Clone all the necessary repositories

  • Make sure to use SSH to make your life easier
git clone git@github.com:IllinoisAUV/robosub_2019.git
git clone git@github.com:IllinoisAUV/uuv_simulator.git
git clone git@github.com:IllinoisAUV/darknet_ros.git
git clone git@github.com:IllinoisAUV/zed-ros-wrapper.git
git clone git@github.com:IllinoisAUV/ardupilot.git

Miscellaneous Dependencies

Gazebo

sudo apt install gazebo9

Nvidia - Make sure to install version 10.0, which can be found here.

Mavros

sudo apt install ros-melodic-mavros
sudo apt install ros-melodic-mavros-extras

ZED SDK

Building

Build using:

  • Use -jx where x is the number of threads you want to run on
  • Do this in the main sigbot directory
catkin build -j4

Run local setup (You should add this to your ~/.bashrc)

source ~/sigbot/devel/setup.bash

Usage

Run simulator with manual controls

rosrun robosub_2019 start_sim.sh

See a list of the current topics

rostopic list

To publish topics, use rostopic pub

rostopic pub /rexrov/cmd_vel geometry_msgs/Twist "linear:
  x: 1.0
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: 0.0" 

Run simulation with code as controls

rosrun robosub_2019 state_machine.py --sim

See a graph of everything that is happening

rqt_graph

Development Notes

state_machine.py has a ton of code for both turning and states. Ideally it would just use states. We use controller overrides to control the robot.

About

Code Stack for the 2019 iteration of the competition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages