1. MoveIt configuration

1.1.Start the program

Start the roscore

Start the MoveIT

1.2. Configuration process

1.2.1. Load URDF model

If an error [model not found] is reported when loading the model, exit MoveIt-->enter the workspace-->compile (sudo apt update)-->update the environment (source devel/setup.bash)-->start the MoveIt configuration again . The interface after startup is as follows:

image-20230922152417776

If you are loading the model generation configuration for the first time, click [Create New MoveIt Configuration Package]; if you are modifying the generated configuration file, click [Edit Existing MoveIt Configuration Package].

image-20230922152517085

Click the [Browse] button, find the URDF model file, and click [Load Files] in the lower right corner to load it.

1.2.2. Create collision exemption matrix

Collision detection is a very complex computational process. For multi-joint robotic arms or humanoid robots, the mechanical structure is complex and there are many joints, and collision detection requires a lot of spatial geometry calculations. But for rigid-body robots, collisions between some joints are impossible, such as adjacent limbs. The purpose of generating self-collision here is to tell us which joints will not collide with each other. In the subsequent collision detection algorithm, the detection between these joints can be directly skipped to improve detection efficiency.

After the model is loaded, select [Self-Collisions] and click the [Generate Collision Matrix] button.

image-20230922152556718

1.2.3. Create a motion planning group

Planning Group is one of the core parts of MoveIt. Click [Add Group] to add a planning group

image-20230922152636126

1.2.3.1. Add robotic arm planning group

Select arm_joint1 to arm_joint5, and then click >, as shown in the figure below,

image-20230922153054763

Click save to complete adding the robotic arm group, as shown in the figure below.

image-20230922153208082

Double-click arm_group to view,

image-20230922153559345

1.2.3.2. Add gripper planning group

Click [Add Group] to add a gripper planning group.

Create a group name and set it to [grip_group]. There is no need to set up a kinematic solver; click [Add Links] to add the gripper link.

image-20230922153658670

Select the connecting rod of the clamping jaw part, click [>], the right side will be added automatically, and click [Save] to save.

image-20230922153855745

The settings are as shown in the picture below,

image-20230922153935766

1.2.4. Create preset poses (Robot Poses)

Select [Robot Poses] and click [Add pose] to add a pose.

Add the robot arm posture, and set the posture name Pose Name to [up]

image-20230922154020203

Add [down] gesture

0010

Add [init] gesture

0011

Add the gripper [close] posture

0012

Add the gripper [open] posture

0013

 

1.2.5. Set end influence joints

Select [End Effectors] and set as shown below

image-20230922160138666

Click Save to save and exit. The settings are completed as shown in the figure below.

image-20230922160209625

1.2.6. Create ROS controller

Select [Controllers], click Add Controller,

image-20230922155704002

Then,Controller Name:arm_position_controller,Controller Type choose position_controllers/JointTrajectoryController

image-20230922155938151

Click Add Planning Group Joints, select arm_group, click >, and click save to save.

image-20230922160035660

The final configuration is shown in the figure below,

image-20230922160115079

1.2.7. Add author information. If you don’t add it, it will not be generated.

Select [Author Information] and add the following content.

image-20230922155627531

1.2.8. Generate configuration file

Select [Configuration Files], click [Browse], select the [x3plus_moveit_config] folder (the folder must be empty), and click the [Generate Package] button to generate the configuration file. After completion, click [Exit Setup Assistant].

image-20230922155451062

After the generation is completed, click Exit Setup Assistant to exit the configuration.

image-20230922155610524

1.3. Detailed explanation of MoveIt configuration package

Open the [x3plus_moveit_config] folder we just created, and we find that there are two folders: config and launch.

1.3.1、config folder

1.3.2. launch folder

1.4. Configuration verification

Enter the workspace where the configuration file is located and execute the following command

Examples are as follows

image-20230922160438805