As a next-generation robot operating system, ROS2 provides powerful support for the intelligent and modular development of robotic arms. As the core motion planning framework in the ROS2 ecosystem, MoveIt2 not only inherits the mature functions of MoveIt but also achieves significant improvements in real-time performance, scalability, and industrial applicability.
Taking a 7-DoF robotic arm as an example, this document provides step-by-step instructions for configuring and generating a complete MoveIt2 package from a URDF model using the MoveIt Setup Assistant, enabling motion planning and visual control. This guide offers a clear, practical workflow for both beginners and developers looking to quickly integrate models into MoveIt2.
AbstractExporting MoveIt Package from URDF
TagsROS2, moveit2, Robotic Arm, nero
Repository- Navigation Repository: GitHub - agilexrobotics/Agilex-College: Agilex College · GitHub
- Project Repository: https://github.com/agilexrobotics/piper/piper_moveit2.git
OS: Ubuntu 22.04ROS Distro: Humble
Introduction to MoveIt2MoveIt2 is the next-generation robotic arm motion planning and control framework developed based on the ROS2 architecture. It can be understood as a comprehensive upgrade of MoveIt in the ROS2 ecosystem. Inheriting the core capabilities of MoveIt, it has made significant improvements in real-time performance, modularity, and industrial application scenarios.
The main problems solved by MoveIt2 include:
- Robotic Arm Motion Planning
- Collision Checking
- Inverse Kinematics (IK)
- Trajectory Generation and Execution
- RViz Visualization and Interaction
You can directly install using binary packages; use the following commands to install all components related to moveit:
sudo apt install ros-humble-moveit*Downloading the URDF FileFirst, create a new workspace and download the URDF model:
mkdir -p ~/nero_ws/src
cd ~/nero_ws/src
git clone https://github.com/agilexrobotics/piper_ros.git -b humble_beta1
cd ..
colcon buildAfter successful compilation, use the following command to view the model in rviz:
cd ~/nero_ws/src
source install/setup.bash
ros2 launch nero_description display_urdf.launch.pyLaunch the moveit_setup_assistant:
roslaunch moveit_setup_assistant setup_assistant.launchSelect Create New Moveit Configuration Package to create a new MoveIt package, then load the robotic arm.
Calculate the collision model; for a single arm, use the default parameters.
Skip selecting virtual joints and proceed to define planning groups. Here, we need to create two planning groups: the arm planning group and the gripper planning group. First, create the arm planning group; set Group Name to arm, use KDL for the kinematics solver, and select RRTstar for OMPL Planning.
Setting the Kin.Chain
Add the control joints for the planning group, select joint1~joint7, click >, then save.
Planning group creation completed.
Setting the Robot Pose; you can pre-set some actions for the planning group here.
Skip End Effectors and Passive Joints, and add interfaces in the URDF.
Setting the controller, here we use position_controllers.
Simulation will generate a URDF file for use in Gazebo, which includes physical properties such as joint motor attributes.
After configuration, fill in your name and email.
Set the package name, then click Generate Package to output the function package.
cd ~/nero_ws/src
source install/setup.bash
ros2 launch nero_moveit2_config demo.launch.pyAfter successful launch, you can drag the marker to preset the arm position, then click Plan & Execute to control the robotic arm movement.




Comments