Lab F: 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 10 page for helpful tips on how to program the arm using the RViz window, GUI, and Python code.

First, run the following commands, which starts ROS, Bringup on the Pi, and the OpenMANIPULATOR Bringup on the PC.

Terminal 1 [PC]:

$ roscore

Terminal 2 [Pi]:

$ ssh pi@IP_OF_TURTLEBOT
$ set_ip LAST_THREE_DIGITS
$ bringup

Terminal 3 [PC]:

$ roslaunch turtlebot3_manipulation_bringup turtlebot3_manipulation_bringup.launch

Turtlebot3 with an arm.

Next, you need MoveIt to manipulate the arm. Launch the following in a new terminal. You should soon see a message that says, You can start planning now! in the terminal running the move_group node.

Terminal 4 [PC]:

$ roslaunch turtlebot3_manipulation_moveit_config move_group.launch

Finally, you can either (on your PC in a fifth terminal window):

Again, please refer back to the class meeting 10 page for the details on these three methods of programming the robot's arm and gripper movements.


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, update the intro_robo class package to get the lab_f_traffic_bot ROS package and starter code that we'll be using for this activity.

$ cd ~/catkin_ws/src/intro_robo
$ git pull
$ git submodule update --init --recursive
$ cd ~/catkin_ws && catkin_make
$ source devel/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 scenario.
TrafficBot from above.

Running Your Code


Terminal 1 [PC]: Run roscore.

$ roscore

Terminal 2 [Pi]: Run Bringup on the Pi.

$ ssh pi@IP_OF_TURTLEBOT
$ set_ip LAST_THREE_DIGITS
$ bringup

Terminal 3 [PC]: Run OpenMANIPULATOR Bringup on the PC.

$ roslaunch turtlebot3_manipulation_bringup turtlebot3_manipulation_bringup.launch

Terminal 4 [PC]: Run the move_group node on the PC.

$ roslaunch turtlebot3_manipulation_moveit_config move_group.launch

Terminal 5 [PC]: Run the traffic.py file, which will send the continuous "traffic signals" to your Turtlebot.

$ rosrun lab_f_traffic_bot traffic.py

Terminal 6 [PC]: Run the python node that moves your robot arm.

$ rosrun lab_f_traffic_bot move.py

Steps to Take & Starter Code


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

Example Solution Code


We will release the example solution code later in the week.

Here is the example solution code.


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.