Skip to main content
Version: ROS 2 Humble

Manipulation in Gazebo Ignition

Simulating an arm in Gazebo Ignition is a safe alternative to test path planning and execution MoveIt! plugins, MoveIt! commander scripts, or simple commands completely independent of the MoveIt! libraries. We facilitate the process of setting up simulations, by providing a customizable, simulated mobile robot platform with sensors and manipulators utilizing the Clearpath Configuration System.

In this tutorial, we will cover using the MoveIt! Planning and Execution RViz plug-in to move arms to a predefined pose. We will use the A200 platform with a Kinova Gen3 Lite in the Clearpath simulator.

The robot.yaml configuration we will use is included below.

A200 YAML

serial_number: a200-0000
version: 0
system:
hosts:
- hostname: cpr-a200-0000
ip: 192.168.131.1
ros2:
namespace: a200_0000
platform:
attachments:
- name: front_bumper
type: a200.bumper
parent: front_bumper_mount
- name: rear_bumper
type: a200.bumper
parent: rear_bumper_mount
- name: top_plate
type: a200.top_plate
manipulators:
arms:
- model: kinova_gen3_lite
parent: top_plate_default_mount
xyz: [0.0, 0.0, 0.0]
rpy: [0.0, 0.0, 0.0]
ip: 192.168.131.40
port: 10000
gripper:
model: kinova_2f_lite

Launching the Simulation

Move the robot.yaml file to your setup directory ($HOME/clearpath by default).

Launch the simulation

ros2 launch clearpath_gz simulation.launch.py setup_path:=$HOME/clearpath

Click on the orange play button in the bottom left corner to start the simulation.

At this point, you will have the platform and manipulator controllers loaded and activated; you can send joint commands to the manipulators and velocity commands to the platform. However, depending on the joint states sent, the manipulators may collide with itself or the platform. Therefore, it is recommended to use MoveIt! to plan and execute collision free paths.

Launching MoveIt!

Launch MoveIt! by passing the same robot setup directory and setting the simulation flag.

ros2 launch clearpath_manipulators moveit.launch.py setup_path:=$HOME/clearpath use_sim_time:=true

Now, you have the move_group node that can be utilized to send a joint or pose goal to a specific manipulation group. However, for this tutorial, we will cover how to visualize the arm in RViz and send goals through the plug-in.

Launching RViz

Launch RViz by passing the robot's namespace and enabling the simulation flag.

ros2 launch clearpath_viz view_moveit.launch.py namespace:=a200_0000 use_sim_time:=True
note

The namespace is defined in the robot.yaml using the system.ros2.namespace parameter.

MoveIt! planning and execution in simulation