Complete all of the following steps to setup your Intro Robotics programming environment:
For this course, the most ideal programming environment is the Ubuntu 22.04 Operating System, however, ROS2 is now available for installation on a wide variety of operating systems (e.g., Ubuntu Linux 22.04, Windows 10, macOS). Below we highlight the different ways to set up your programming environment for this course depending on your computer's native operating system.
eduroam
if you're on campus or via UChicago's VPN if you're off campus. Once connected to a UChicago network, double click the machine you've set up. You'll be prompted for your UChicago credentials (CNetID + password) twice, once in NoMachine and once on the machine itself.
eduroam
if you're on campus or via UChicago's VPN if you're off campus. Once connected to a UChicago network, double click the machine you've set up. You'll be prompted for your UChicago credentials (CNetID + password) twice, once in NoMachine and once on the machine itself.
.iso
image file from this list of Ubuntu 22.04 releases (we recommend ubuntu-22.04.4-live-server-arm64.iso
for Macs with M1/M2 chips and ubuntu-22.04.4-live-server-amd64.iso
). Then follow these instructions for creating an Ubuntu VM ("Creating a new virtual machine" and "Installing Ubuntu Desktop"), with the following changes: [step 8] change the "Network Mode" to "Bridged(Advanced)" and [step 9] after rebooting, if the screen is black or has error messages, click "Drive image options"—>"CD/DVD (ISO) Image"—>"Eject", and then click on the backwards arrow to restart the VM. Then, follow these instructions to install ROS2 Humble on Ubuntu 22.04 using binary packages.
eduroam
if you're on campus or via UChicago's VPN if you're off campus. Once connected to a UChicago network, double click the machine you've set up. You'll be prompted for your UChicago credentials (CNetID + password) twice, once in NoMachine and once on the machine itself.
Note: Skip this step if you are using the NoMachine CSIL VM. The NoMachine CSIL VM already has all of these dependencies installed.
Install the following dependencies. Note that the Debian package / Linux binary installation options are the only ones that the course staff have tested on a Ubuntu 22.04 installation (and have ensured that they work). ROS2 installations on Windows and Mac operating systems will require binary installation that may or may not install easily or properly.
$ sudo apt install python3-colcon-common-extensions
$ sudo apt-get install python3-rosdep
$ sudo rosdep init
$ rosdep update
$ sudo apt update && sudo apt install ros-humble-turtlebot4-desktop
$ sudo apt update
$ sudo apt install ros-humble-turtlebot4-description \
ros-humble-turtlebot4-msgs \
ros-humble-turtlebot4-navigation \
ros-humble-turtlebot4-node
$ sudo apt install ros-humble-turtlebot4-simulator ros-humble-irobot-create-nodes
$ sudo apt install ros-dev-tools
$ sudo apt-get update && sudo apt-get install wget
$ sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
$ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
$ sudo apt-get update && sudo apt-get install ignition-fortress
$ sudo apt install \
ros-humble-ros2-control \
ros-humble-moveit* \
ros-humble-gazebo-ros2-control \
ros-humble-ros2-controllers \
ros-humble-controller-manager \
ros-humble-position-controllers \
ros-humble-joint-state-broadcaster \
ros-humble-joint-trajectory-controller \
ros-humble-gripper-controllers \
ros-humble-hardware-interface \
ros-humble-xacro
$ sudo apt install ros-humble-moveit
These instructions are based on this ROS2 tutorial page. First, add the source /opt/ros/humble/setup.bash
command to your ~/.bashrc
file.
$ echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
Then carry out the following commands to create your ROS2 workspace directory and build it:
$ source ~/.bashrc
$ mkdir -p ~/intro_robo_ws/src
$ cd ~/intro_robo_ws/
$ colcon build
Then, source the overlay by adding the source install/local_setup.bash
command to your ~/.bashrc
file and source it.
$ echo "source ~/intro_robo_ws/install/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
colcon build
command or open a new terminal, you'll need to source the
intro_robo_ws/install/local_setup.bash
file, which is why we're adding it to the ~/.bashrc
file.
If you have already set up git on your machine, you can skip this step.
Set up your git identity with the same email associated with your GitHub account:
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
There are several ways to set up git credentials on your machine. We'd suggest generating a personal access token and storing it on your machine. Here are the steps to do this:
Settings > Developer Settings > Personal access tokens > Tokens (classic)
.git
command to clone the intro_robo
repository (see below) or complete a different git
operation that requires authentication. When requested for your username and password, enter your username and your personal access token.$ git config --global credential.helper store
In the last step, we setup the the class repository, a place where we will put some course-related code and common course utilities. Navigate to your ~/intro_robo_ws/src
folder and clone the class repository:
$ cd ~/intro_robo_ws/src
$ git clone https://github.com/Intro-Robotics-UChicago-Fall-2025/intro_robo
The key files in the intro_robo
repo are bash files that allow you to easily configure ROS2 environment variables to enable you to connect with a specific Turtlebot4 robot. To finish this setup, run:
$ echo "export ROS_LOCALHOST_ONLY=0" >> ~/.bashrc
$ echo "source ~/intro_robo_ws/src/intro_robo/intro_robo_utils/set_discovery_server_env_variables.sh" >> ~/.bashrc
$ echo "source ~/intro_robo_ws/src/intro_robo/intro_robo_utils/discovery_server_env_variables.sh" >> ~/.bashrc
$ source ~/.bashrc
We give a BIG thank you to UChicago CS techstaff (especially Colin Hudler and Justin Laughlin) for their help and support in setting up the NoMachine CSIL 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.