Computer Setup
Setup Checklist
Complete all of the following steps to setup your Intro Robotics programming environment:
Choose/Setup Your Programming Environment
For this course, the most ideal programming environment is the Ubuntu 20.04 Operating System.
There are many ways to configure an Ubuntu 20.04 programming environment (virtual machines, an Ubuntu 20.04
partition on your laptop). Additionally, you can use ROS outside Ubuntu (ROS for Windows, ROS2, ROS through
Windows Subsystem for Linux). Here are our recommendations for configuring your programming environment based on
the native operating system of your computer:
- Linux OS
-
If you are running an Ubuntu distribution of Linux ensure that your running version 20.04, and then install ROS Noetic.
-
If you are running a distrubtion of Linux other than Ubuntu, you can pursue one of the following
options:
-
Install ROS Noetic on your native Linux distribution
- Pros: Better performance and hopefully little to no latency issues, especially when using
the Gazebo simulator, and you can use your native OS.
- Cons: If you run into any issues that are specific to your Linux distribution, the course
staff may not be able to help you since we have only tested the course content on the Ubuntu 20.04
distribution of Linux.
-
Set up an Ubuntu VM with VirtualBox
- Pros: Easy setup and the VM is tested and supported by the course staff.
- Cons: The VM experiences often high amounts of latency, espeically when using the Gazebo
simulator.
Note:
If you have a Linux OS, we recommend trying to install ROS directly on your OS. We recommend you try to avoid VMs at all costs, as the performance on your machine will be significantly better than on a VM.
- Windows OS
- Set up an Ubuntu 20.04 dual boot: Setting up a dual boot will partition your computer's hard drive where one part will run a Ubuntu 20.04 OS and the other will run your computer's default OS. To set up a dual boot, you'll first need to create a bootable USB thumb drive with Ubuntu 20.04 on it, follow the instructions on this "Create a bootable USB stick on Windows" Ubuntu Tutorial. Then install Ubuntu 20.04 on your machine from the USB thumb drive. I found it helpful to follow itzgeek's Ubuntu Dual Boot Alongside Windows instructions starting from Step 3.
- Pros: Better performance and hopefully little to no latency issues, especially when using the
Gazebo simulator.
- Cons:
You're making a pretty big change to your host computer and it may not be worthwhile for you in the long
run.
- Set up an Ubuntu 20.04 External Portable SSD: Instead of partitioning your hard drive to create a dual boot, one very attractive option is purchasing an external SSD and booting Ubuntu 20.04 from the external drive. We recommend following these instructions from Shu Ishida to set up an external SSD with Ubuntu 20.04. Once you set up the external SSD, you'll also need to install ROS Noetic.
- Pros: Better performance and hopefully little to no latency issues, especially when using the Gazebo simulator. Unlike dual-booting, you're not making any big changes to your host computer.
- Cons:
You'll have to purchase an external portable SSD and the setup is a bit more involved.
-
Set up a Remote Graphical Session to a Virtual CSIL Machine: Install Microsoft Remote Desktop. Ensure that you're connected to a UChicago wireless network (either by being on campus or through UChicago's VPN). Then, launch the Microsoft Remote Desktop app, and click the plus button to add a new PC "Add PC". To set up the new PC, you'll need to specify the remote CSIL5 desktop name we've assigned to you (please reach out to the teaching staff for this). The other settings can remain at their defaults (unless you'd like to assign a "Friendly Name" for this PC) and you can click "Add". Once the PC has been added, you can double click on it to connect, and authenticate using your CNetID and password.
- Pros: Easy setup and the virtual CSIL machines are tested and supported by the course staff. Also, the virtual CSIL machines should have a significantly better performance than other VMs, since the computing resources are external to your machine.
- Cons: You may experience some latency.
-
[NEW] Set up a Remote Graphical Session to a Virtual CSIL Machine with NoMachine: Install NoMachine, a software application that enables you to remotely access the virtual CSIL5 machines. Once you've installed the application, open it and press the "Add" button to add a new remote machine. For the name, you can put in anything you like. For the host, put in the hostname of the CSIL5 remote machine you've been assigned. Keep all of the other fields as the default values and press the "Add button". Next, double click the machine you've set up to access the remote machine. You'll have to enter your credentials (CNetID + password) twice, once in NoMachine and once on the machine itself. The best way to exit out of the machine is to "Log Out" of your session.
- Pros: Easy setup and the virtual CSIL machines are tested and supported by the course staff. Also, the virtual CSIL machines should have a significantly better performance than other VMs, since the computing resources are external to your machine.
- Cons: You may experience some latency.
-
Set up an Ubuntu VM with VirtualBox
- Pros: Easy setup and the VM is tested and supported by the course staff.
- Cons: The VM experiences often high amounts of latency, espeically when using the Gazebo
simulator.
Note:
If you have a Windows OS, you will find the best performance of your Ubuntu 20.04 environment by pursuing either the dual-boot or external SSD options. However, virtual machines aren't too bad, and of the options you have, we recommend using the Microsoft Remote Desktop.
- Mac OS
-
Set up a Remote Graphical Session to a Virtual CSIL Machine: Install Microsoft Remote Desktop. Ensure that you're connected to a UChicago wireless network (either by being on campus or through UChicago's VPN). Then, launch the Microsoft Remote Desktop app, and click the plus button to add a new PC "Add PC". To set up the new PC, you'll need to specify the remote CSIL5 desktop name we've assigned to you (please reach out to the teaching staff for this). The other settings can remain at their defaults (unless you'd like to assign a "Friendly Name" for this PC) and you can click "Add". Once the PC has been added, you can double click on it to connect, and authenticate using your CNetID and password.
- Pros: Easy setup and the virtual CSIL machines are tested and supported by the course staff. Also, the virtual CSIL machines should have a significantly better performance than other VMs, since the computing resources are external to your machine.
- Cons: You may experience some latency.
-
[NEW] Set up a Remote Graphical Session to a Virtual CSIL Machine with NoMachine: Install NoMachine, a software application that enables you to remotely access the virtual CSIL5 machines. Once you've installed the application, open it and press the "Add" button to add a new remote machine. For the name, you can put in anything you like. For the host, put in the hostname of the CSIL5 remote machine you've been assigned. Keep all of the other fields as the default values and press the "Add button". Next, double click the machine you've set up to access the remote machine. You'll have to enter your credentials (CNetID + password) twice, once in NoMachine and once on the machine itself. The best way to exit out of the machine is to "Log Out" of your session.
- Pros: Easy setup and the virtual CSIL machines are tested and supported by the course staff. Also, the virtual CSIL machines should have a significantly better performance than other VMs, since the computing resources are external to your machine.
- Cons: You may experience some latency.
-
Set up an Ubuntu VM with VirtualBox: The VirtualBox VM will only work for Macs with an Intel Processor and with an OS that is pre-Monterey.
- Pros: Easy setup and the VM is tested and supported by the course staff.
- Cons: The VM experiences often high amounts of latency, espeically when using the Gazebo
simulator.
-
Set up a UTM VM: To set up a UTM Virtual Machine, you'll need to download and install UTM and download this Ubuntu ISO image: https://old-releases.ubuntu.com/releases/focal/ubuntu-20.04.4-live-server-amd64.iso (please note that this image is different than the one for Macs with an M1 processor). Once you've installed UTM and downloaded the ISO image, follow these instructions for creating an Ubuntu VM ("Creating a new virtual machine" and "Installing Ubuntu Desktop"), with the following changes:
-
In step 8 before running
the VM, select the VM, click on Edit, then Network, and change the “Network Mode” to “Bridged
(Advanced)”. When going through the installer, you can keep all of the default settings.
-
In step 9, when the installer asks you to reboot the system, you will likely get a black screen
with a blinking cursor or a series of error messages. Go to the top-right of the VM window, click "Drive
image options”—>”CD/DVD (ISO) Image”—>”Eject”, and then click on the backwards arrow to restart the VM.
The VM should then load up Ubuntu Server, from which you can install Ubuntu Desktop.
After finishing the Ubuntu Desktop installation, running the VM should take you to a regular Ubuntu login screen and you're all set. Make sure to also install ROS Noetic once you log in.
- Pros: Students who took 223 using an Intel Mac reported that the performance was good and that
UTM used up fewer resources than VirtualBox.
- Cons: Similar to the VirtualBox VM, this VM may experience high amounts of latency, espeically when using the Gazebo simulator. Additionally, prior students in the course have found UTM to be very frustrating and they often have to re-install it several times throughout the course.
- Set up an Ubuntu 20.04 External Portable SSD: One final option for Macs is purchasing an external SSD and booting Ubuntu 20.04 from the external drive. We recommend following these instructions from Floris van Breugel to set up an external SSD with Ubuntu 20.04 for a Mac. Once you set up the external SSD, you'll also need to install ROS Noetic.
- Pros: This option is likely to achieve Mac users the best performance with little to no latency issues, especially when using the Gazebo simulator.
- Cons:
You'll have to purchase an external portable SSD and the setup is a bit more involved. This option yet to been tested by either course staff or students.
Note:
If you have a Mac OS, we most highly recommend using the Microsoft Remote Desktop.
Setting Up Your Catkin Workspace
Creating Your catkin_ws
These instructions are based on this ROS tutorial page. First, add the source /opt/ros/noetic/setup.bash
command to your ~/.bashrc
file.
$ echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
Then carry out the following commands:
$ source ~/.bashrc
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/
$ catkin_make
Then, add the source catkin_ws/devel/setup.bash
command to your ~/.bashrc
file and source it.
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
Note:
Every time you run the catkin_make
command or open a new terminal, you'll need to source the
catkin_ws/devel/setup.bash
file, which is why we're adding it to the ~/.bashrc
file.
To ensure that you've set up your catkin workspace properly: 1) close your current terminal window, 2) open a new
terminal window, and 3) enter the command roscd. If you've set up your catkin workspace correctly, you
should now be in the directory ~/catkin_ws/devel
.
Turtlebot3 ROS Setup
Next, navigate to your catkin workspace's src
folder and clone the necessary git repositories used
for the Turtlebot3:
$ cd ~/catkin_ws/src
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
$ git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
$ git clone -b develop https://github.com/ROBOTIS-GIT/turtlebot3_manipulation.git
$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_manipulation_simulations.git
$ git clone https://github.com/ROBOTIS-GIT/open_manipulator_dependencies.git
Finally, run the catkin_make
command within your catkin workspace, source the
devel/setup.bash
file, and set your default turtlebot3 model to the waffle pi.
$ cd ~/catkin_ws && catkin_make
$ source devel/setup.bash
$ echo "export TURTLEBOT3_MODEL=waffle_pi" >> ~/.bashrc
Note:
If you are using the Microsoft Remote Desktop, you will find that the
catkin_make command above causes an error related to the
open_manipulator_dependencies
ROS package. If this happens to you, please follow these steps to build your
catkin_ws
successfully:
$ cd ~/catkin_ws
$ env -i bash
$ source devel/setup.bash
$ rm -rf build
$ catkin_make
$ echo "export TURTLEBOT3_MODEL=waffle_pi" >> ~/.bashrc
Then, exit out of your terminal tab and start a new one to continue.
You can test to ensure that you've installed all of the Turtlebot3 packages and dependencies by trying out a
built-in teleoperation demo of the Turtlebot3 in a simulated house environment. You'll need to run the following
commands in 3 separate terminal windows (or terminal tabs).
Terminal 1:
$ roscore
Terminal 2:
$ roslaunch turtlebot3_gazebo turtlebot3_house.launch
You should now see a Turtlebot3 waffle (without the arm) within a simulated house environment:
Terminal 3:
$ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
Follow the directions in the terminal to teleoperate your simulated turtlebot3!
Class Repo/Package Setup
In the last step, we setup the the class repository. The class package is where you will place your scripts and
use common course utilities. Navigate to your catkin workspace's src
folder, clone the class
repository and pull all of its submodules:
$ cd ~/catkin_ws/src
$ git clone https://github.com/Intro-Robotics-UChicago-Fall-2023/intro_robo
$ cd intro_robo
$ git submodule update --init --recursive
Then, similar to before, run the catkin_make
command within your catkin workspace and source the
devel/setup.bash
file.
$ cd ~/catkin_ws && catkin_make
$ source devel/setup.bash
The class repository contains several important catkin packages:
lab_letter_exercise
: These packages contain the necessary files for
conducting the lab exercises. The letter specifies the lab and the exercise specifies the specific
exercise the package is addressing. For instance the lab_a_stop_at_wall
is for the stop at wall
exercise in lab A.
We will update the class package throughout the course to add new class meeting packages. Hence, you should
update this package and build it prior to each class meeting. You can do so via the following commands:
$ cd ~/catkin_ws/src/intro_robo
$ git submodule update --init --recursive
$ cd ~/catkin_ws && catkin_make
$ source devel/setup.bash
Setting Up Your IDE
Recommended IDE
We recommend using VSCode to develop ROS
applications. The autocomplete features from VSC extensions are very helpful when first learning rospy
.
These are the extensions that we found helpful:
Here's also a guide to
managing extensions in VSCode.
Hints & Tricks
If you are unfamiliar with Ubuntu or Gnome, we recommend that you take some time to familiarize with the user
interface and the functionalities. Here is a short intro the gnome desktop. Additionally,
students in the past have found the following tidbits helpful,
- Adjusting the Resolution and Scale: You can adjust your virtual machine window resolution by clicking on
Display Settings in the right click pop up menu. This will bring up the display settings, in which you
can adjust the screen resolution and scale your window.
- Terminal Tabs: As you familiarize yourself with ROS and gazebo, you will find yourself in need of
running multiple terminals at the same time. Having one window per terminal usually leads to clutter. Another
approach would be to only open one terminal window and use terminal tabs.
Acknowledgments
We give a BIG thank you to Colin Hudler and UChicago CS techstaff for their help and support in setting up
the virtual desktops and VirtualBox VMs as well as their ongoing support for ensuring that each student in the class get a working programming
environment for Intro Robotics. We also thank Borja Sotomayor for sharing the instructions he and his team
developed for setting up a UTM VM for M1 Macs.