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-fullThen get dependencies
rosdep updateSet up your environment variables
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
source /opt/ros/melodic/setup.bashInstall python tools
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essentialMake a directory for the project
mkdir sigbot
cd sigbot/Install catkin tools
sudo apt install python-catkin-toolsInternalize the workspace
catkin_init_workspaceMake a src folder
mkdir src
cd srcClone 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.gitGazebo
sudo apt install gazebo9Nvidia - 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-extrasZED 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 -j4Run local setup (You should add this to your ~/.bashrc)
source ~/sigbot/devel/setup.bashrosrun robosub_2019 start_sim.shSee a list of the current topics
rostopic listTo 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 --simrqt_graphstate_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.