CS 354 Autonomous Robotics -- ROS2 Foxy Install

This document outlines how to config a workstatiion with all the required software for CS 354 (Autonomous Robotics). This class will use ROS 2 on a Ubuntu/Linux environment. The ROS 2 version utilizied will be Foxy (which is NOT the most current version of ROS 2). Foxy requires that the OS be based on Ubuntu 20.04 (focal) , and I recommend the Cinnamon/Uma Mint 20.2 release (which is what is in the labs this year).

Step 1: Install Ubuntu (via a virtual machine)

Unless you are running Ubuntu natively, you will need to install a virtual machine in order to host the Ubuntu operating system on your computer.

If you are running Windows 10, you can install VirtualBox by following these instructions. This configuration has been used in the past for ROS2 and it performs acceptably.

If you are running Mac OS, it is highly recommended to install VMWare Fusion, which you can install by following these instructions. Other VMs have had issues using some of the graphical interfaces programs with ROS2.

Step 2: Installing ROS 2

Once you have a virtual machine running Mint 20.2 (Ubuntu 20.04), you will need to install ROS 2 by following these instructions.

Step 1: Installing ROS software

You can download the installROS2.sh script and place it on your virtual machine. You can run it by setting it to be execute using chmod and then running it:

            chmod 700 installROS2.sh
            ./installROS2.sh
         
It will prompt you for your account password. This process takes about 10 to 15 minutes depending on your machine and the speed of your Internet connection.

Step 2: Configure ROS2

You can download the ros2_config_account.sh script and place it on your virtual machine. You can run it by setting it to be execute using chmod and then running it:

            chmod 700 ros2_config_account.sh
            source ./ros2_config_account.sh
         
This process runs very fast and only needs to be run once.

Step 3: Testing your ROS2 environment

To test your ROS 2 configuration, you can open 2 terminals. Make sure these terminals have read the latest .bashrc file (the one you updated by running ros2_config_account.sh in Step 2.
In the first terminal, execute this command:

            ros2 run demo_nodes_cpp talker
         
In the second window, run this command:

           ros2 run demo_nodes_py listener
         

Some of these instructions and the example programs are from the ROS website (ros.org)