Lab E: Robot Arm Programming

Today's Lab



Physical Robot Arm Control


This section details how to get the physical turtlebot's OpenManipulator arm up and running. Please refer back to the class meeting 9 page for helpful tips on how to program the arm using the OpenManipulatorX GUI and Python code.

  1. Position the Arm: Position the arm as shown in the picture below to enable the arm to initialize properly. If you fail to do this, you may find that any movement command you send to the arm will fail.
    initial OpenManipulatorX arm position
  2. Then, run the following commands, which start Bringup and MoveIT! on the Pi, and the OpenManipulator c++ interface on the PC.

  3. [Terminal #1] SSH into the robot (password: turtlebot4), check USB port number, and run bringup:
    $ set_robot_num [robot_num]
    $ ssh ubuntu@$ROBOT_IP
    $ sudo dmesg | grep ttyUSB
    After running sudo dmesg | grep ttyUSB look for which USB port the FTDI USB Serial Device is connected to, it should be either ttyUSB0 or ttyUSB1. Now run the bringup command for the arm by specifying the USB port you identified in the prior step.
    $ bringup_arm port_name:=/dev/ttyUSB1 
    Note: bringup_arm is an alias for the command ros2 launch open_manipulator_x_bringup hardware.launch.py.
  4. [Terminal #2] SSH into the robot and start MoveIt!: In a separate second terminal, ssh into the robot and start MoveIt!.
    $ ssh ubuntu@$ROBOT_IP
    $ start_moveit 
    Note: start_moveit is an alias for the command ros2 launch open_manipulator_x_moveit_config move_group.launch.py.
  5. [Terminal #3] Control the robot from your PC: You have a couple options here:
    • For the OpenManipulatorX GUI:
      $ ros2 launch open_manipulator_x_gui open_manipulator_x_gui.launch.py
    • For running code: This is the option we'll be using today
      $ ros2 run [package-name] [file-name]
  6. Turtlebot4 with an arm.

Lab Exercise: TrafficBot


In this exercise, we will use the arm of the Turtlebot to guide imaginary traffic. You should not use the robot's wheels for this exercise. You will be working the same groups.


Getting Started


To get started on this exercise, you'll need to clone three packages:

  1. Lab E starter code package: starter code to complete the traffic bot
  2. The c++ OpenManipulator interface package: an interface required to control the arm using python (we will not be editing this)
  3. The common interfaces package: the package that we'll be able to create and store custom messages in

Run the following commands:

$ cd ~/intro_robo_ws/src/
$ git clone https://github.com/Intro-Robotics-UChicago-Fall-2025/lab_e_traffic_bot.git
$ git clone https://github.com/Intro-Robotics-UChicago-Fall-2025/custom_interfaces.git
$ cd ~/intro_robo_ws
$ colcon build --symlink-install --packages-select lab_e_traffic_bot custom_interfaces
$ source install/setup.bash      

Your Goal


Your goal in this exercise will be to have the robot arm move in a distinct manner based on the direction it receives via the traffic_status topic. Here is an example using the Turtlebot3.
TrafficBot from above.

Running Your Code


Terminal 1: SSH into the robot and run bringup.

$ set_robot_num [robot_num]
$ ssh ubuntu@$ROBOT_IP
$ bringup_arm port_name:=/dev/[USB port]
Note: Refer to instructions above or in Operating the OpenManipulatorX Arm to learn how to find which USB port the arm is connected to.

Terminal 2: SSH into the robot and start MoveIt!.

$ ssh ubuntu@$ROBOT_IP
$ start_moveit 

Terminal 3 : Run the OpenManipulator c++ interface on the PC.

$ ros2 run omx_cpp_interface arm_cmd

Terminal 4: Run the traffic node, which will send the continuous "traffic signals" to your Turtlebot.

$ ros2 run lab_e_traffic_bot traffic

Terminal 5: Run the node that moves your robot arm.

$ ros2 run lab_e_traffic_bot move

Steps to Take & Starter Code


There are few steps you would need to take to complete this exercise.

Tips & Hints about the Arm & Gripper


Acknowledgments


I want to thank former Intro Robotics TAs Pouya Mahdi Gholami and Yves Shum for developing the traffic box exercise and Lauren Wright for adapting it to ROS2.