This is an old revision of the document!
We’ll be using ROS2 (Robot Operating System) throughout this course. ROS2 provides tools, libraries, and conventions that facilitate building robotic applications and allow different parts of the robot to interact with each other.
Familiarize yourself with the basics of ROS by reviewing the ROS introduction guide (https://wiki.ros.org/ROS/Introduction). Keep this guide handy as a ROS2 cheat sheet (https://github.com/ubuntu-robotics/ros2_cheats_sheet/tree/master) that you can refer to throughout the course. We also have a list of important ROS2 commands for this course here: What is ROS 2?
ROS services in Pupper: robot.service manages control code (face controller, rl or heuristic controller, etc). See if controller is running: systemctl status robot.service You should see the status as “active (running)”. Checkout all topics and services: ros2 topic list and ros2 service list.
Since we are running custom code, we must disable the robot service before working on your code. This will prevent the robot from running any pre-existing code that may interfere with your work. Make sure to place Pupper on the stand during this process. To disable the robot service, run the following commands:
Note: Robot Service should already be disabled. So you can skip this step and proceed to Part 2.
sudo systemctl disable robot.service sudo reboot
If you see “ros_2 not found”, run source ~/.bashrc again
cd ~/lab_1_fall_2025 code .
lab_1_fall_2025/lab_1.py to understand where the motor angle and velocity are read and where the motor is commanded.Note: In ROS2 code, pay attention to publishers and subscribers defined in the ''__init__'' section of the node definition. Publishers send messages to topics, while subscribers listen to messages on topics. Callback functions run when new information is published to a topic.
DELIVERABLE: Before running your code, explain in your lab document what you understand about the publishers and subscribers. What gets sent and received on each message publish? How does this correspond to what is physically commanded in the motor?