User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs:getting_started:start [2020/10/01 20:57]
Chris Nathman [Getting our Code]
cs:getting_started:start [2022/04/15 02:19] (current)
Chris Nathman [Now What?]
Line 4: Line 4:
  
 ===== OS ===== ===== OS =====
-The sub itself runs [[https://​linuxmint.com/​download_all.php|Linux Mint]] 17.3. As such, we recommend using the same operating system, although any distro based on Ubuntu 14.04 //should// work. We do not support developing on Windows. We do have limited support for Ubuntu 16.04 (xenial), but right now 14.04 (trusty) ​is the officially ​supported ​version. We only recommend using xenial if you're having issues on your computer with trusty.+The sub itself runs Ubuntu 20.04 (focal), as do most membersAny operating system ​which can run ROS2 foxy should work such as Linux Mint 20. Windows is currently not supported.
  
 ==== Virtual Machine ==== ==== Virtual Machine ====
-If you don't feel comfortable installing linux on your machine yet, you can get started ​quickly ​with a virtual machine. ​However, we highly recommend members to install linux on their machine, the virtual machine works very poorly. +If you don't feel comfortable installing linux on your machine yet, you can get started with a virtual machine. ​To do so you can install virtualization software such as virtualBox.
-You can download our [[http://​robosub.eecs.wsu.edu/​owncloud/​index.php/​s/​59dHbQnBK2jgO4O/​download|robosub virtualbox disk image here]]. It's a 2.7GB compressed download, after extracting with [[http://​www.7-zip.org/​|7zip]] it's around 11GB. This already has the robosub code repository downloaded and all dependencies installed, ​so you can skip some steps. To run the virtual machine image, you'll first need to download [[https://​www.virtualbox.org/​wiki/​Downloads|Virtualbox]]. Note however that you cannot run the simulator within a virtual machine, gazebo7 crashes.+
  
 ===== Languages ===== ===== Languages =====
-We use primarily ​C++ for the software on the sub, with a little bit of Python2 (note: not Python3) for the AI. 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]]
  
 ===== Getting Prerequisite Software ===== ===== Getting Prerequisite Software =====
-This will setup your computer with our custom robosub package repository, the ROS package repositoryand the Gazebo package repository. When you install our robosub/​robosub-simulator package, all other dependencies ​will automatically be downloaded. If you experience any issues, please contact the [[slack>​it|IT slack channel]].+This will setup your computer with ROS package repository and other dependencies. If you experience any issues, please contact the [[slack>​it|IT slack channel]].
 Depending on your operating system, follow the instructions on one of these pages: Depending on your operating system, follow the instructions on one of these pages:
  
 ==== Install ROS ==== ==== Install ROS ====
-Deprecated: <del>[[cs:getting_started:​indigo:​|ROS Indigo (for Ubuntu 14.04 trusty or Linux Mint 17)]]</del> \\ +[[https://docs.ros.org/en/​foxy/​Installation.html|ROS2 Foxy]] (for Ubuntu 20.04 focal or Linux Mint 20)
-Deprecated: <​del>​[[cs:​getting_started:​kinetic:​|ROS Kinetic (for Ubuntu 16.04 xenial or Linux Mint 18)]]</​del>​ \\ +
-ROS2 Foxy (for Ubuntu 20.04 focal or Linux Mint 20) \\+
  
-==== Getting ​our Code ==== +==== Additional Dependencies ==== 
-Follow these steps for getting the robosub ​code on your computer. +Complete prerequisite software setup as follows: 
-First, make sure you have ssh authentication ​setup with gitlab. You only need to do this once on each computer. To check if you already have keys made for your computer, run:+ 
 +Add ROS2 setup script to bash configuration file and reload it. 
 +<code bash> 
 +$ echo "​source /​opt/​ros/​foxy/​setup.bash"​ >> ~/.bashrc 
 +$ source ~/.bashrc 
 +</​code>​ 
 + 
 +Install additional apt packages needed by our code. 
 +<code bash> 
 +$ sudo apt update 
 +$ sudo apt install git python3-rosdep2 python3-colcon-common-extensions ros-foxy-gazebo-ros ros-foxy-gazebo-plugins socat 
 +</​code>​ 
 +==== SSH Key Setup (optional) ​==== 
 +SSH keys allow you to upload ​code to gitlab without entering a password. This makes development more convenient but less secure since someone else could use your key if they get access to your computer. ​Follow these steps if you want to setup ssh keys on your computer. You only need to do this once on each computer. To check if you already have keys made for your computer, run:
  
 <code bash> <code bash>
Line 49: Line 59:
   Connection to gitlab.com closed.   Connection to gitlab.com closed.
  
 +==== 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.
-  echo "​source /​opt/​ros/​foxy/​setup.bash"​ >> ~/.bashrc 
-  source ~/.bashrc 
-  sudo apt install python3-rosdep2 python3-colcon-common-extensions ros-foxy-gazebo-ros ros-foxy-gazebo-plugins 
-  mkdir -p ~/ros/src 
-  cd ~/ros/src 
-  git clone https://​gitlab.com/​PalouseRobosub/​Software/​robosub.git 
-  git clone https://​gitlab.com/​PalouseRobosub/​Software/​robosub_simulator.git 
-  git clone https://​gitlab.com/​PalouseRobosub/​Software/​robosub_msgs.git 
-  cd robosub 
-  git checkout ros2 
-  cd ../​robosub_msgs 
-  git checkout ros2 
-  cd ../​robosub_simulator 
-  git checkout ros2 
-  cd ~/ros 
-  colcon build 
-  echo "​source ~/​ros/​install/​setup.bash"​ >> ~/.bashrc 
-  echo 'alias rsmake="​(cd ~/ros && colcon build)"'​ >> ~/.bashrc 
-  source ~/.bashrc 
  
 +Create a directory for robosub code and move into it.
 +
 +<code bash>
 +$ mkdir -p ~/ros/src
 +$ cd ~/ros/src
 +</​code>​
 +
 +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.
 +
 +<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.
 ===== 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!