RoArm-M2-S 4. Drag-and-drop Interactions in Moveit2
| ||
4. Drag-and-drop Interactions in Moveit2
4.1 Moveit2 Introduction
MoveIt2 is an open-source software for the robotic movement plan, operation and control. It provides a series of simple user interfaces for helping developers handle complicated issues related to movement plans.
MoveIt2 supports a variety of algorithms and strategies, including motion planning, motion execution, motion monitoring, kinematic parsing, and collision detection. Its powerful features make it widely used in industry, research and education.
MoveIt2 runs in the ROS2 (Robot Operating System 2) environment and can be seamlessly integrated with other ROS2 tools and libraries, which greatly improves the efficiency and convenience of robot development.
In this tutorial, we will use MoveIt2 to control the movement of the robot arm. By dragging and dropping the endpoints of the robot arm, MoveIt2 is able to automatically calculate the movement path of the arm and control the actual movement of the arm through the driver nodes.
4.2 Moveit2 Drag-and-drop Demo
If you are following the previous tutorials down, before running this demo, you need to close the previous Rviz2 Robotic Arm Model Joints interface by pressing Ctrl+C in the Run View Rviz2 Robotic Arm Model Joints terminal window to close this process. The running terminal of the robotic arm driver node does not need to be closed, otherwise it will not be able to control the real robotic arm.
If you terminate the process of robotic arm's driving nodes, you need to reoperate it following this guide. Keep running robotic arm's driving nodes, and then run the Moveit2 drag-and-drop interaction demo.
- After closing the Rviz2 Robotic Arm Model Joints interface, you can run the Moveit2 drag-and-drop demo in this interface. Run the following commands to start Rviz2:
ros2 launch roarm_moveit interact.launch.py
- You can also run it in the New Terminal interface. To run it in the New Terminal interface, you must first enter the workspace of the robotic arm ROS2, and then run the demo for the drag-and-drop interaction of the robotic arm Moveit2, as follows:
cd roarm_ws_em0 ros2 launch roarm_moveit interact.launch.py
CAUTION: After executing this command, the arm will rotate (the small arm is extended directly in front and parallel to the horizontal plane), do not place fragile items around the arm and keep it away from children.
After starting Rviz2, if the robotic arm is not identified, click Display -> Fixed Frame -> map, and then change it to "base_link". Press "Enter" key to confirm, as shown below.
Then click "Add" in the bottom left corner, select "MotionPlanning" and click "OK". Now you can see the model of the robot arm traveling in the Rviz2 visualization interface. You can refer to section 3.5 to change the viewpoint of the robot arm.
The robotic arm's attitude can now be changed by dragging the drag ball located at the end of the arm or the XYZ axis. After dragging and dropping to change the attitude, you need to click "Plan & Execute" in the Planning tab on the right side of the Rviz2 visualization interface to let the robot arm execute the dragged attitude movement. After the execution, you need to reset the arm to the initial position in the Rviz2 startup interface, then change the "Goal State" option in the Planning tab to "home", and then click "Plan & Execute" again. After that, click "Plan & Execute" again to let the robot arm respond to the motion.
Planning Group: change the state of EoAT (End of Arm Tooling) from "hand" to "gripper". Also, you can adjust the angle of the "Gripper". In the left Joints tab, swipe to set the angle of the Link3_to_gripper, and then return to Planning tab to change the "Start State" option to "<previous>" and then click "Plan & Execute" to let the robotic arm act. After changing the "Goal State" option to "open" in the Planning tab, the gripper will be fully open; after selecting "close", the gripper will be closed.
RoArm-M2-S ROS2 Humble + Moveit2 Tutorial
- RoArm-M2-S 1. How to Install ROS2
- RoArm-M2-S 2. ROS2 Workspace Description
- RoArm-M2-S 3. Drive Nodes to Control Real-world Robotic Arm
- RoArm-M2-S 4. Drag-and-drop Interactions in Moveit2
- RoArm-M2-S 5. Control the Robotic Arm with Gamepad or Keyboard
- RoArm-M2-S 6. Using Foxglove for Web-Based Control
- RoArm-M2-S 7. Web Application Based on ROS2Web app
- RoArm-M2-S 8. Control Robotic Arm with Commands
- RoArm-M2-S 9. Combined Use
- RoArm-M2-S 10. Ubuntu 22.04 Install ROS2 Humble Tutorial