Skip to content

Synchronize Robot Pose to RViz Display

When using MoveIt2 or Gazebo for path planning and simulation, accessing the real-time pose of the physical robot is often required as a reference. This functionality collects the robot's joint state data in real time and publishes it to the /joint_states topic, enabling synchronization of the robot's true pose. Data published to this topic can be subscribed to and used by tools like MoveIt2, Gazebo, and RViz for displaying the current robot state, planning paths, or driving simulations.


Step 1: Configure Robot IP Address

Edit the gbt_driver/config/robot_config.yaml file and set the robot_ip_address field to the actual IP address of your robot.

Then, start the feedback service:

bash
source install/setup.bash
ros2 launch gbt_driver gbt_feedback.launch.py

Step 2: Synchronize Arm State to URDF

Launch rviz2 and synchronize the robotic arm's state to the URDF model:

bash
source install/setup.bash
ros2 launch gbt_driver gbt_bridge.launch.py robot_type:=<robot_type>

Example for C5A model:

bash
source install/setup.bash
ros2 launch gbt_driver gbt_bridge.launch.py robot_type:=C5A

You can now view the robotic arm's real-time state in RViz.


Note:

  • Replace <robot type> with the actual robot model name (e.g., C5A , C7A , C12A , C16A ).
  • Ensure the robot's network configuration is correct before launching.
  • For additional configuration details, refer to the Agilebot ROS2 github.