1. MoveIt2 configuration

Note: The factory image of this course has been configured. If you use the factory image system, you can skip the moveit configuration course.

1.1. Install MoveIt2

The Jetson Orin series motherboard can run Moveit2 related cases directly on the motherboard, and the overall fluency is acceptable!

Open another terminal.

1.2. Start the assistant

Start MoveIt Setup Assistant:

For the first time, you can choose to create a new MoveIt configuration package. For later simple modifications, you can choose to compile the existing MoveIt software package:

image-20250506152807162

To create a new MoveIt configuration package, you need to import the robot's URDF model: Simply importing the URDF model file into the MoveIt assistant will result in an error. You need Use the compiled software package (jetcobot_description) URDF file path

image-20250506152843350

After selecting the URDF file, click Load File, and the MoveIt assistant will display the robot model:

image-20250506152936827

1.3, Collision Detection

The self-collision matrix is a function used to optimize motion planning. Its main function is to generate a matrix to describe whether collisions may occur between the various links in the robot model.

This matrix can help the motion planner avoid unnecessary collision detection when planning the path, thereby improving planning efficiency.

The self-collision matrix can be automatically generated by clicking the MoveIt Setup Assistant option:

image-20250506153212500

image-20250506153230399

1.4. Virtual joints

A virtual joint is a tool used to define the relationship between a robot model and the outside world.

Virtual joints are usually used to describe the connection between the robot base and a fixed reference system (such as the world coordinate system).

image-20250506153304082

Fix the robot base link base_link and world:

image-20250506153349622

image-20250506153404232

1.5, Motion Planning Group

The planning group is a key step in configuring the robot motion planning.

The planning group defines which joints and links in the robot can move together and how to plan their motion.

image-20250506153949946

Planning robot arm group: arm_group

image-20250506154042292

Joints: 1_Joint, 2_Joint, 3_Joint, 4_Joint, 5_Joint, 6_Joint

image-20250506154154740

image-20250506154620242

Plan gripper group: grip_group

image-20250506154659995

image-20250506154729712

image-20250506154745154

1.6. Robot position

Set three sets of predefined robot arm positions to the robot configuration:

image-20250506155030761

You can manually move the slider to set the state of each joint: up, down, init

image-20250506155108084

i mage-20250506155207952

image-20250506155635532

image-20250506155654151

1.7. End Effector

Set the gripper group as the end effector:

image-20250506155732017

End Effector: gripper

image-20250506155823615

image-20250506155833511

1.8. Passive Joints

Passive joints are non-actuated joints that cannot be directly controlled: if the robot arm does not have a passive joint, it will be skipped directly.

image-20250506155846139

1.9, URDF file

The MoveIt Setup Assistant automatically sets up the command interface and state interface for each joint: use the default generated information.

image-20250506155859915

1.10, ROS2 Controllers

ROS2 Controllers is a framework for real-time robot control that can be used to automatically generate simulation controllers to drive robot joints.

image-20250506155926663

Add robot arm controller:

image-20250506160000275

image-20250506160119498

image-20250506160130539

1.11, MoveIt Controllers

MoveIt requires a trajectory controller with the FollowJointTrajectoryAction interface to execute the planned trajectory, which sends the generated trajectory to the robot ROS2 controller.

Added MoveIt Controllers need to ensure that the controller name matches the name configured in ROS2 Controllers.

image-20250506160208795

Add robot arm controller:

image-20250506160327248

image-20250506160350472

image-20250506160358881

1.12. Sensors

Configure the settings of the 3D sensor used by the robot: No configuration is required.

image-20250506160412107

1.13. Startup File

Configure the automatically generated startup file: Use the default options.

image-20250506160423765

1.14. Author Information

Add author information for package generation:

image-20250506160502328

1.15. Generate configuration

Generate configuration files to the specified folder:

image-20250506160557302

image-20250506160625150

image-20250506160639279

2. Configuration files

Enter the dofbot_pro_moveit folder:

image-20250506160743408

3. Configuration verification

MoveIt Setup The configuration file generated by Assistant needs to be modified to remove the warnings at startup and the problem of model not loading.

3.1, modify the configuration file

image-20250506160822358

Modify the jetcobot.ros2_control.xacro file: modify the function of loading yaml

image-20250506160905837

3.2, compile the software package

3.3、Start MoveIt

Starting the simulation is slow. When the terminal displays You can start planning now! or the robot arm displays a trackball (the trackball is a newly added sphere on the robot arm), the loading is complete.

image-20250506162633041

image-20250506162651243

References

MoveIt2 Humble: https://moveit.picknik.ai/humble/index.html

MoveIt2: https://moveit.picknik.ai/main/index.html