All the code that runs in the submarine.
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
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
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 [email protected]:IllinoisAUV/robosub_2019.git
git clone [email protected]:IllinoisAUV/uuv_simulator.git
git clone [email protected]:IllinoisAUV/darknet_ros.git
git clone [email protected]:IllinoisAUV/zed-ros-wrapper.git
git clone [email protected]:IllinoisAUV/ardupilot.git
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
- Go to ZED's website and follow their installation instructions
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
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"
rosrun robosub_2019 state_machine.py --sim
rqt_graph
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.