Welcome to DOFBOT Pro repository
6. MoveIt Inverse Kinematics Design
MoveIt Inverse Kinematics Design
MoveIt Inverse Kinematics Design1. Usage Environment2. Drive Real Robot2.1. Start Real Robot2.2. Launch MoveIt23. Inverse Kinematics DesignLaunch CommandPrecautions
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. Inverse Kinematics Design
Inverse Kinematics refers to given the position of the robotic arm's end effector, MoveIt calculates the angles of each joint of the robotic arm, and then plans to the target pose by itself.
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 plan to the position by itself
#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 set_target_position
Precautions
Since it is difficult to determine the position of the robotic arm's end effector, it is recommended that users find reachable poses using the following method.
View the pose of Arm5_Link and then replace the target pose in the program: The robotic arm needs to be planned and executed to the specified pose for data changes to occur.
MotionPlanning →Planned Path → Links:Positions、Orientation
