This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
cs:getting_started:start [2022/04/15 01:42] Chris Nathman [Additional Dependencies] |
cs:getting_started:start [2022/04/15 02:19] (current) Chris Nathman [Now What?] |
||
|---|---|---|---|
| Line 10: | Line 10: | ||
| ===== Languages ===== | ===== Languages ===== | ||
| - | We use primarily C++ and Python3 for the software on the sub. Below are a few links for tutorials for these languages, these are just a few I quickly found to get you started, feel free to search around for other tutorials. | + | We use C++ and Python3 for the software on the sub. Below are a few links for tutorials for these languages, these are just a few I quickly found to get you started, feel free to search around for other tutorials. |
| * [[http://www.learncpp.com/| C++]] | * [[http://www.learncpp.com/| C++]] | ||
| * [[https://www.codecademy.com/learn/python|Python]] | * [[https://www.codecademy.com/learn/python|Python]] | ||
| Line 26: | Line 26: | ||
| Add ROS2 setup script to bash configuration file and reload it. | Add ROS2 setup script to bash configuration file and reload it. | ||
| <code bash> | <code bash> | ||
| - | echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc | + | $ echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc |
| - | source ~/.bashrc | + | $ source ~/.bashrc |
| </code> | </code> | ||
| Install additional apt packages needed by our code. | Install additional apt packages needed by our code. | ||
| <code bash> | <code bash> | ||
| - | sudo apt update | + | $ sudo apt update |
| - | sudo apt install git python3-rosdep2 python3-colcon-common-extensions ros-foxy-gazebo-ros ros-foxy-gazebo-plugins socat | + | $ sudo apt install git python3-rosdep2 python3-colcon-common-extensions ros-foxy-gazebo-ros ros-foxy-gazebo-plugins socat |
| </code> | </code> | ||
| ==== SSH Key Setup (optional) ==== | ==== SSH Key Setup (optional) ==== | ||
| Line 61: | Line 61: | ||
| ==== Getting our Code ==== | ==== Getting our Code ==== | ||
| Finally, we need to setup our ROS workspace with the robosub code. | Finally, we need to setup our ROS workspace with the robosub code. | ||
| - | mkdir -p ~/ros/src | + | |
| - | cd ~/ros/src | + | Create a directory for robosub code and move into it. |
| - | git clone https://gitlab.com/PalouseRobosub/Software/robosub.git | + | |
| - | git clone https://gitlab.com/PalouseRobosub/Software/robosub_msgs.git | + | <code bash> |
| - | git clone https://gitlab.com/PalouseRobosub/Software/robosub_simulator.git | + | $ mkdir -p ~/ros/src |
| - | cd ~/ros | + | $ cd ~/ros/src |
| - | colcon build | + | </code> |
| - | echo "source ~/ros/install/setup.bash" >> ~/.bashrc | + | |
| - | echo 'alias rsmake="(cd ~/ros && colcon build)"' >> ~/.bashrc | + | Clone essential robosub repositories. Note that here we clone using https. If you setup ssh keys than you should clone using ssh instead. Replace the ''<nowiki>https://gitlab.com/</nowiki>'' parts of the links below with ''git@gitlab.com:'' to clone with ssh. |
| - | source ~/.bashrc | + | |
| + | <code bash> | ||
| + | $ git clone https://gitlab.com/PalouseRobosub/Software/robosub.git | ||
| + | $ git clone https://gitlab.com/PalouseRobosub/Software/robosub_msgs.git | ||
| + | $ git clone https://gitlab.com/PalouseRobosub/Software/robosub_simulator.git | ||
| + | </code> | ||
| + | |||
| + | Move back to the ros directory. | ||
| + | |||
| + | <code bash> | ||
| + | $ cd ~/ros | ||
| + | </code> | ||
| + | | ||
| + | Compile the code for the first time. This will take some time since it has to compile a lot of code. Future compilation should be much faster since the build system will know what it has already compiled. | ||
| + | |||
| + | <code bash> | ||
| + | $ colcon build | ||
| + | </code> | ||
| + | |||
| + | Add compiled code configuration to bash configuration file. | ||
| + | |||
| + | <code bash> | ||
| + | $ echo "source ~/ros/install/setup.bash" >> ~/.bashrc | ||
| + | </code> | ||
| + | |||
| + | Add ''rsmake'' alias to bash configuration file so future compilation can be run easily. | ||
| + | |||
| + | <code bash> | ||
| + | $ echo 'alias rsmake="(cd ~/ros && colcon build)"' >> ~/.bashrc | ||
| + | </code> | ||
| + | |||
| + | Reload bash configuration file. | ||
| + | |||
| + | <code bash> | ||
| + | $ source ~/.bashrc | ||
| + | </code> | ||
| From now on you should be able to compile code using ''rsmake'' from any directory. | From now on you should be able to compile code using ''rsmake'' from any directory. | ||
| ===== Now What? ===== | ===== Now What? ===== | ||
| - | If you were able to successfully compile the software at the end, congrats! Next steps are to learn how to use [[cs:git:start|git]], and take a look at the [[cs:sw_workflow:|software workflow]]. After this, head over to the [[https://gitlab.com/PalouseRobosub/Software/robosub/-/issues|gitlab issues page]] and see if a task looks interesting! | + | If you were able to successfully compile the software at the end, congrats! Next steps are to learn how to use [[cs:git:start|git]] and review c++ and python3. After this, head over to the [[https://gitlab.com/PalouseRobosub/Software/robosub/-/issues|gitlab issues page]] and see if a task looks interesting! |