MoveIt Configuration

Preface

We have built MoveIt environments on both the Jetson_Nano motherboard and the Orin series motherboard. Due to the onboard performance of the Jetson_Nano, running the MoveIt program on the motherboard will be slow and slow to load, and it will take about 3 minutes to complete the loading. Therefore, we recommend running the MoveIt program on the configured virtual machine we provide. The Orin motherboard can run MoveIt smoothly on the motherboard without running it on a virtual machine. Whether running on a virtual machine or on the motherboard, the startup instructions are the same. The following tutorials will take running on the Orin motherboard as an example.

1. Create a MoveIt configuration folder

Before configuring MoveIt, you need to create a folder to save the results of the MoveIt configuration. Usually, this folder is stored in the src directory of the workspace, at the same level as the function package. Enter the following command to create,

2. Start the configuration program

Start roscore

Open another terminal and start MoveIt

3. Configuration process

When configuring MoveIt for the first time, we choose to create a new MoveIt configuration function package, click [Create New MoveIt Configuration Package】,

image-20241016142856951

Click the Browse button, find the URDF model file, and click the lower right corner to load. The URDF path is, /home/jetson/dofbot_pro_ws/src/DOFBOT_Pro-V24/urdf/DOFBOT_Pro-V24.urdf

image-20241025160523196

Click [Load Files] to load the URDF model.

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

image-20241025153944498

The creation is completed as shown in the figure below,

image-20241025154005907

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

image-20241025154303830

Kinematics solver, which is responsible for solving forward kinematics (Forward Kinematics) and inverse kinematics (IK). Generally, we choose KDL, The Kinematics and Dynamics Library. This is a kinematics and dynamics library that can well solve the forward and inverse kinematics problems of single-chain mechanical structures with more than 6 degrees of freedom.

Of course, you can also use other IK Solvers, such as SRV or IK_FAST, or even develop a new Solver yourself and insert it.

image-20241025154336340

Click [Add Joints] to add joints, select Arm1_Joint to Arm5_Joint in [Available Joints] on the left and add them to [Selected Joints] on the right.

image-20241025154411737

Click [Save] to complete the addition. After adding, it is as shown in the figure below.

image-20241025154432480

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

Set the group name to [grip_group], and there is no need to set the kinematic solver; click [Add Links] to add the gripper link.

image-20241025155000453

Select rlink1 to rlink3 in the [Available Links] on the left and add them to the [Selected Links] on the right. Click [>] to automatically add the right side.

image-20241025155028442

Click [Save] to save. After setting, the following figure is shown.

image-20241025154039139

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

image-20241025154634438

Add the robot arm pose, set the pose name Pose Name to [up], and click [Save] to save the pose.

image-20241025154713374

Add the [down] pose and click [Save] to save the pose.

image-20241025154757138

Add [init] posture, click [Save] to save the posture,

image-20241025154840419

Add the gripper [open] posture, click [Save] to save the posture,

image-20241025155125783

Add the gripper [close] posture, click [Save] to save the posture,

image-20241025155201777

Select [End Effectors], click [Add End Effector],

image-20241025155349772

Set as shown below, click [Save] to save,

image-20241025155421513

Save the settings as shown below,

image-20241025155452047

Select [ROS Control], click [Add Controller】,

image-20241025155545256

Note: On the Jetson-Nano motherboard, here is displayed [ROS Control]

image-20241014115221407

Set as shown below,

image-20241025155621925

Click [Add Planning Group Joints】, add planning group joints, set as shown below,

image-20241025155656963

Click [Save] to save, and the settings will be as shown below,

image-20241025155714094

Select [Author Information], add the following content,

image-20241025155731401

Select [Configuration Files】, click 【Browse】, select the folder dofbot_pro_config created in the first step

image-20241025155809578)

Click the 【Generate Package】 button, a confirmation box pops up, click 【ok】 to generate the configuration file,

image-20241025155830761

image-20241025155845331

After completion, click 【Exit Setup Assistant】, complete as shown below,

image-20241025155909234

4. Detailed explanation of MoveIt configuration package

Open the newly created [dofbot_pro_config] folder, and we find two folders: config and launch.

config folder

launch folder

5. Configuration verification

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

The Jetson-Nano motherboard may start slowly. When the following figure is shown, it means that the startup is successful and the loading is complete.

image-20241025160043231

Note: If the green [OMPL] cannot be displayed in [Context] on the Jetson_Nano motherboard, you need to [Planning] in [Planning] Group】, change the default [arm_group] to [gripper_group], and then go back to [Context] to see if the green [OMPL] is displayed. If the green [OMPL] still cannot be displayed, you need to restart demo.launch.

Select the [arm_group] planning group, and change "current" in [Goal State] to "init", as shown below,

image-20241025160130467

Click [Plan&Execute], plan and execute,

image-20241025160156169

In rviz, the robot arm will move to the [init] posture we preset before. Set it in rviz as shown below,

image-20241025160306367

The robot arm will not keep repeating the movement.

As shown in the figure below, cancel Goal_State, and rviz will not always display the state of the goal.

image-20241015183256911

After the setting is completed, press [Ctrl+s] to save the rviz settings.