In this assignment, you will use MoveIt 2 to plan and execute motions for a simulated Franka Emika Panda robot arm. You will learn how to:
- Set up and run a ROS 2 simulation environment using Docker
- Use MoveIt 2's RViz interface for interactive motion planning
- Understand frames and transforms, inspecting telemetry topics, and experimenting with different planner behaviors
- Execute planned motions on a simulated robot
Submit a PDF document containing:
- All screenshots as specified in the deliverables.
- Written answers to all questions.
If you have an NVIDIA GPU, install the NVIDIA Container Toolkit for hardware-accelerated rendering:
# Add the repository
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
# Install
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart dockerClone this repository and build the Docker image:
git clone https://github.com/CoMMALab/CS593-SER-LAB-01 lab01
cd lab01
.docker/build.bashStart the Docker container:
.docker/run.bashYou should now be inside the container at /root/ws.
Build the ROS 2 workspace inside the container:
colcon build --merge-install --symlink-install --cmake-args "-DCMAKE_BUILD_TYPE=Release"
source install/setup.bashDeliverable 1.3: Based on the output of colcon build, how many packages are built as part of the project?
First, start a tmux session so you can run multiple commands:
tmuxYou can create new tabs with Ctrl+b then c, and switch between them with Ctrl+b then p (previous) or n (next).
Launch the fake controller demo (no physics simulation, instant motion execution):
ros2 launch panda_moveit_config ex_fake_control.launch.pyThis will open RViz with the MoveIt Motion Planning plugin.
In RViz, locate the "MotionPlanning" panel on the left side. You should see:
- Planning Group: Currently set to "arm" (the 7-DOF manipulator)
- Start State: The current robot configuration (shown in green)
- Goal State: The target configuration (shown in orange)
In RViz, click Add in the Displays panel, select TF, and click OK to visualize the robot's coordinate frames.
In another tmux tab, generate a TF tree diagram:
ros2 run tf2_tools view_frames --output framesThis creates a frames.pdf file. To view it, open a terminal outside the container and copy it out:
docker cp $(docker ps -qf "ancestor=panda_gz_moveit2"):/root/ws/frames.pdf .Then open frames.pdf on your host machine.
Deliverable 2.3: Answer the following questions:
- What is the child frame of
panda_link8(i.e. the end-effector frame)? - What is the parent frame of
panda_link4? What aboutpanda_link0? - How many links (not including endpoints) are in the kinematic chain between
panda_link0andpanda_rightfinger?
- In RViz, you should see an interactive marker (colored rings and arrows) at the robot's end-effector
- Drag the marker to move the goal pose
- The orange "ghost" robot shows where the arm will move to
- With a goal pose set, click the "Plan" button in the MotionPlanning panel
- Observe the planned trajectory animation. The trajectory shows how the robot will move from start to goal
Deliverable 3.1:
- Plan a motion that moves the end-effector of the robot.
- Take a screenshot showing the planned trajectory (the animated path).
- Record the planning time displayed in the panel.
- Click "Execute" to run the planned trajectory
- The robot (green) will move to match the goal (orange)
- Alternatively, use "Plan & Execute" to do both steps at once
Deliverable 3.2: Take a screenshot showing the robot in its new position after execution.
The SRDF defines several named poses:
- ready - A neutral starting pose
- extended - Arm fully extended
- transport - Compact pose for transport
- In the MotionPlanning panel, find the "Goal State" dropdown
- Select one of the predefined poses
- Plan and execute the motion
Deliverable 3.3:
- Execute motions to visit a sequence of all three predefined poses and a custom pose (ready → extended → transport → a custom pose → ready)
- For each transition, record:
- Planning time
- Whether the plan succeeded on the first attempt
Now launch the Gazebo simulation (close the fake control demo first, or use a new tmux tab):
ros2 launch panda_moveit_config ex_gz_control.launch.pyThe motion planner uses OMPL (Open Motion Planning Library) with the RRTConnect algorithm by default.
Deliverable 4.1: After launching the simulation, answer the following questions using ros2 topic list and ros2 topic info:
- Run
ros2 topic listin the othertmuxsession. What topic is published to so that MoveIt can query the planning scene? (Hint: you can cross-checkpanda_moveit_config/scripts/scene_publisher.py) - Run
gz topic -e -t /world/tabletop_world/dynamic_pose/info. What is the ID of the red box? What is its initial position and orientation? (Hint: try piping the output ofgztogrep) - What action server does MoveIt use for trajectory execution? (Hint: use
ros2 action list)
- In Gazebo, drag one of the tabletop objects (red box or blue cylinder) to a new position
- Observe that RViz's planning scene updates automatically
- Position an object between the robot and a goal pose
- Attempt to plan a motion through/around the obstacle
Deliverable 4.2:
- Take two screenshots showing a planned trajectory that avoids the obstacle, before and after executing.
- What happens if you place the obstacle directly on the goal pose?
- In the MotionPlanning panel, find the Context tab
- Use the planner dropdown to select different OMPL planners (e.g., RRTConnect, RRT*, PRM, EST)
- Find another goal pose that has an obstacle between it and the robot
- For each planner, run
planfor the same motion 5 times
Deliverable 4.3: Compare at least 3 different planners and create a table with:
- Planner name
- Average planning time (out of 5)
- Path length (qualitative: short/medium/long)
- Success rate (out of 5)
Which planner would you choose for a time-critical application? Which for path quality?
Displaying GUI applications (RViz, Gazebo) from Docker on macOS requires XQuartz.
If windows don't appear or you get display errors:
- Install XQuartz if not already installed:
brew install --cask xquartz - Log out and back in after installation
- Open XQuartz, go to Preferences → Security, enable "Allow connections from network clients"
- Restart XQuartz
- Run
xhost +localhostbefore starting the container
Performance: Gazebo uses software rendering on macOS (no GPU passthrough). Increase Docker Desktop memory to 8GB+ in Settings → Resources.
- Without NVIDIA toolkit, Gazebo will use software rendering (slower)
- If GUI doesn't appear, ensure X11 forwarding is working:
xhost +local:docker