Skip to main content

Gazebo and ros2_control

Gazebo Harmonic is the physics simulator (gz-sim 8): rigid bodies, contacts, cameras, custom system plugins. It is the physical ground truth for the baseline.

ros2_control is the standard control stack: a controller manager loads controllers (joint trajectory, gripper position, joint-state broadcaster) that read/write hardware interfaces.

gz_ros2_control is the bridge plugin: simulated joints look like a real robot to ros2_control. Controllers do not care whether the “motor” is metal or a physics engine.

Why it matters here​

MoveIt does not talk to Gazebo directly:

MoveIt trajectory
→ FollowJointTrajectory controllers
→ gz_ros2_control
→ Gazebo joints

Grasping uses a custom Gazebo attachment system (detachable joint) plus a ROS adapter, because beverage restock needs carry semantics beyond open/close fingers. The baseline uses wrist RGB-D confirmation for operational object poses and wrist surveys for lane evidence. The ground-truth adapter publishes separate evaluator topics by default; it is an explicit opt-in operational source.

Arm and rail controllers are velocity (+ feed-forward); the gripper is position (simulation lag on the gripper is expected). The simulation clock arrives on /clock: use it for acquisition stamps, TF lookups, observation freshness and controller timing. Operation and whole-task budgets deliberately use a steady clock, so a paused or slow simulation can still exceed a deadline. Record both clocks when investigating a timeout.

This project​

PiecePath
World SDFrestocker_gazebo/worlds/restocking.sdf
Attachment pluginrestocker_gazebo/src/attachment_system.cpp
Ground-truth adapter…/src/ground_truth_adapter.cpp
Attachment ROS node…/src/attachment_adapter_node.cpp
Hardware tagsrestocker_description/urdf/ros2_control.xacro
Controllersrestocker_control/config/controllers.yaml
ros2_control Gazebo Harmonic
──────────── ───────────────
controller_manager
├─ arm_controller ──┐
├─ rail_controller ─┼─► gz_ros2_control ─► joints / physics / cameras
├─ gripper_controller┘
└─ joint_state_broadcaster

attachment_system plugin ─► attachment ROS adapter

References​