Welcome to DOFBOT Pro repository
9. MoveIt Trajectory Planning
MoveIt Trajectory Planning
MoveIt Trajectory Planning1. Usage Environment2. Drive Real Robot2.1. Start Real Robot2.2. Launch MoveIt23. Trajectory Planning3.1. Visualization3.2. Launch Command
1. Usage Environment
Board: Jetson Orin Nano/Nx
ROS2: Humble
If you are using a Jetson Nano development board, you will need to enter the commands from the tutorial into the accompanying virtual machine to run this function.
2. Drive Real Robot
Driving the real robot is done by subscribing to MoveIt2's /joint_states topic and converting the robotic arm's joint state information into control of the real robotic arm.
Note: Since the real robotic arm does not have obstacle avoidance functionality, some poses may collide with obstacles; therefore, try to make the planned robotic arm motions reasonable and avoid positions with obstacles
(It is recommended to use preset poses for driving the real robot demonstration)
The Jetson Nano mainboard requires multi-device communication configuration. The robotic arm and the virtual machine need to be on the same network, and the ros_domain_id of the virtual machine must match the ros_domain_id in the Docker container. (The factory configuration already ensures that both ros_domain_ids are the same; you only need to ensure that the virtual machine and the robotic arm are on the same network.)
2.1. Start Real Robot
Without driving the real robot, perform simulation demonstration of robotic arm motion in MoveIt:
#Jetson Nano users need to run this command in a virtual machine, while Orin users can run this command directly on the mainboard.ros2 run dofbot_pro_driver dofbot_pro_driver2.2. Launch MoveIt2
#Jetson Nano users need to run this command in a virtual machine, while Orin users can run this command directly on the mainboard.ros2 launch dofbot_pro_moveit demo.launch.py
3. Trajectory Planning
After the program runs, the robotic arm will plan the trajectory to the target position, and the robotic arm's end effector will draw the motion trajectory in RViz2.
3.1. Visualization
Before running the launch command, you need to add the MarkerArray plugin in RViz2 to display the planned path: MarkerArray needs to select the arm_group topic


3.2. Launch Command
The robotic arm needs to be successfully loaded in MoveIt and You can start planning now! appears before running the following command: The robotic arm will automatically draw the planned path trajectory
#Jetson Nano users need to run this command in a virtual machine, while Orin users can run this command directly on the mainboard.ros2 run dofbot_pro_moveit multi_track_motion