MoveIt2 is an advanced software framework for robot motion simulation, planning and control.
Motherboard: Jetson Orin Nano/Nx
ROS2: Humble
xxxxxxxxxx
sudo apt install ros-humble-moveit*
The Jetson Orin series motherboard can run MoveIt2 related cases directly on the motherboard, and the overall fluency is acceptable!
Create the configuration file automatically generated by MoveIt2:
xxxxxxxxxx
mkdir ~/dofbot_pro_ws/src/dofbot_pro_moveit
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
Start MoveIt Setup Assistant:
xxxxxxxxxx
ros2 launch moveit_setup_assistant setup_assistant.launch.py
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:
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
x/home/jetson/dofbot_pro_ws/src/dofbot_pro_description/urdf/DOFBOT_Pro-V24.urdf
After selecting the URDF file, click Load File and the MoveIt Assistant will display the robot model:
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:
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).
Fix the robot base link base_link
and world
:
Virtual Joint Name: virtual_joint
Child Link: base_link
Parent Frame Name: world
Joint Type: fixed
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.
Planning robot arm group: arm_group
Group Name: arm_group
Kinematic Solver: kdl_kinematics_plugin/KDLKinematicsPlugin
Kin. Search Resolution (sampling density of joint space): 0.005
Kin. Search Timeout (solution time): 0.005
Add Joints: Select the joints of the robot arm
Joints:Arm1_Joint、Arm2_Joint、Arm3_Joint、Arm4_Joint、Arm5_Joint
Planning gripper group: grip_group
Group Name: grip_group
Kinematic Solver: None
Kin. Search Resolution: 0.005
Kin. Search Timeout: 0.005
Add Links: Select the connecting rod of the gripper
Links:rlink1、rlink2、rlink3
Robot arm position
Set three sets of robot arm predefined postures to the robot configuration:
You can manually move the slider to set the state of each joint: up, down, init
Jaw Position
Set two sets of predefined gripper poses to the robot configuration:
You can manually move the slider to set the gripper state: open, close
Set the gripper group as the end effector:
End Effector: gripper
End Effector Name: gripper
End Effector Group: gripp_group
Parent Link: Arm5_Link
Parent Group: None
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.
MoveIt Setup Assistant will automatically set up the command interface and status interface for each joint: use the default generated information.
ROS2 Controllers is a framework for real-time robot control, which can be used to automatically generate simulation controllers to drive robot joints.
Add a robotic arm controller:
Controller Name:arm_group_controller
Controller Type:joint_trajectory_controller/JointTrajectoryController
Add Planning Group Joints:arm_group
Add the gripper controller:
Controller Name:grip_group_controller
Controller Type:position_controllers/GripperActionController
Add Planning Group Joints:grip_group
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.
Add a robotic arm controller:
Controller Name:arm_group_controller
Controller Type:FollowJointTrajectory
Add Planning Group Joints:arm_group
Add the gripper controller:
Controller Name:grip_group_controller
Controller Type:Gripper Command
Add Planning Group Joints:grip_group
Configure the settings of the 3D sensor used by the robot: No configuration is required.
Configure the automatically generated startup file: Use the default options.
Add author information for software package generation:
Generate configuration files to the specified folder:
Enter the dofbot_pro_moveit
folder:
The configuration file generated by MoveIt Setup Assistant needs to be modified to remove the warnings and model loading issues during startup.
DOFBOT_Pro-V24.ros2_control.xacro
Modify the DOFBOT_Pro-V24.ros2_control.xacro
file: modify the function of loading yaml
xxxxxxxxxx
load_yaml(initial_positions_file)['initial_positions']
xacro.load_yaml(initial_positions_file)['initial_positions']
joint_limits.yaml
Modify the joint_limits.yaml
file: change all joint maximum velocities and accelerations to decimals
xxxxxxxxxx
cd ~/dofbot_pro_ws
colcon build --packages-select dofbot_pro_moveit
source install/setup.bash
xxxxxxxxxx
ros2 launch dofbot_pro_moveit demo.launch.py
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.
MoveIt2 Humble:https://moveit.picknik.ai/humble/index.html