MoveIt2 configuration

MoveIt2 is an advanced software framework for robot motion simulation, planning and control.

1. Environment setup

Motherboard: Jetson Orin Nano/Nx

ROS2: Humble

1.1. Install MoveIt2

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

1.2. Create a folder

Create the configuration file automatically generated by MoveIt2:

2. MoveIt2 configuration

MoveIt Setup Assistant is a graphical tool to simplify and speed up the creation and configuration of MoveIt2 configuration packages.

Through this tool, users can easily generate configuration files for robot motion planning and control without manually editing complex configuration files

2.1. Start the Assistant

Start MoveIt Setup Assistant:

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

image-20250305174800376

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 report an error, and you need to use the compiled package (dofbot_pro_description) URDF file path

image-20250305175943869

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

image-20250305180101549

2.2, 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 links in the robot model.

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

To generate a self-collision matrix, you can click the MoveIt Setup Assistant option to automatically generate it:

image-20250305183214187

image-20250305183340811

2.3. Virtual joints

A virtual joint is used to define the relationship between the robot model and the external 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-20250305184644937

Fix the robot base link base_link and world:

image-20250305184733462

image-20250305184856534

2.4, Motion Planning Group

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

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

image-20250305185351035

image-20250305185502182

Joints:Arm1_Joint、Arm2_Joint、Arm3_Joint、Arm4_Joint、Arm5_Joint

image-20250305190112382

image-20250305190158097

image-20250305190331791

Links:rlink1、rlink2、rlink3

image-20250305190506952

image-20250305190531991

2.5. Robot position

Robot arm position

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

image-20250305191029778

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

image-20250305191245818

image-20250305191410473

image-20250305191634810

Jaw Position

Set two sets of predefined gripper poses to the robot configuration:

image-20250305192100132

You can manually move the slider to set the gripper state: open, close

image-20250305192301775

image-20250305192508707

image-20250305192535674

2.6. End effector

Set the gripper group as the end effector:image-20250305192605675

End Effector: gripper

image-20250305192758225

2.7 Passive joints

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

image-20250305192814878

2.8, URDF file

MoveIt Setup Assistant will automatically set up the command interface and status interface for each joint: use the default generated information.

image-20250305192829192

2.9, ROS2 Controllers

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

image-20250305192925205

Add a robotic arm controller:

image-20250305193059777

image-20250305193132805

image-20250305193207754

Add the gripper controller:

image-20250305193513163

image-20250305193546541

image-20250305193552879

2.10, 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-20250305193406553

Add a robotic arm controller:

image-20250305193655948

image-20250305193732506

image-20250305193844362

Add the gripper controller:

image-20250305193915632

image-20250305193941768

image-20250305194141769

2.11. Sensors

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

image-20250305194237290

2.12, Startup file

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

image-20250305194243360

2.13, Author information

Add author information for software package generation:

image-20250305194323907

2.14. Generate configuration

Generate configuration files to the specified folder:

image-20250305194440251

image-20250305194502418

image-20250305194516124

3. Configuration file

Enter the dofbot_pro_moveit folder:

image-20250305195512227

4. Configuration Verification

The configuration file generated by MoveIt Setup Assistant needs to be modified to remove the warnings and model loading issues during startup.

4.1. Modify the configuration file

DOFBOT_Pro-V24.ros2_control.xacro

Modify the DOFBOT_Pro-V24.ros2_control.xacro file: modify the function of loading yaml

image-20250305200640886

joint_limits.yaml

Modify the joint_limits.yaml file: change all joint maximum velocities and accelerations to decimals

image-20250305201048332

4.2. Compile the software package

4.3. Start MoveIt

Starting the simulation is slow. Wait until the terminal displays You can start planning now! or the robot arm has a trackball (the trackball is a new sphere on the robot arm), indicating that the loading is complete.

image-20250305201459589

image-20250305201702834

References

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

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