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:


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:

Topics in HRI

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:

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,


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.