Testing MoveIt 2 using Rviz2
MoveIt 2 provides a plugin for RViz2, which can be used to monitor the robot’s state and the environment and allows users to easily make new planning requests and preview the planned motions. After generating the configuration files of the robot to interface it with MoveIt, we can use this plugin to test the robot’s motion. First, start the simulation to activate the controllers:
ros2 launch panda_description panda_gazebo.launch.py
Then, use the demo launch file contained in the panda_moveit_config
package:
ros2 launch panda_moveit_config demo.launch.py
Set the simulation time to true
:
ros2 param set /move_group use_sim_time true
If everything works fine, we will see the following screen of RViz2 being loaded with the MotionPlanning plugin provided by MoveIt 2, as shown in Figure 9.6. Here, you have a planning panel (bottom left) that can be used to set up the motion planning problem.

Figure 9.6: Generating...