Welcome to DOFBOT-Ultra repository
8. MoveIt Scene Design
MoveIt Scene Design
Please ensure that the web control program backend process is not running in the background. To close it, refer to the [Get Started Quickly - 2. Access the Terminal] section in [Disable the Auto-Start Web Control Backend Process]. After closing, please restart DofbotUltra!!!
MoveIt Scene Design1. Usage Environment2. Drive Real Robot2.1. Start Real Robot2.2. Start MoveIt23. Scene DesignLaunch CommandExample Effect Explanation
1. Usage Environment
Motherboard: VMware Workstation virtual machine Ubuntu 22.04 image
ROS2: Humble
2. Drive Real Robot
Driving the real robot is accomplished by subscribing to the MoveIt2 /joint_states topic, converting the joint state information of the arm into control commands for the real robot.
Note: Since the real robot does not have obstacle avoidance functionality, some poses may hit obstacles. Therefore, planned arm motions should be as reasonable as possible and avoid positions with obstacles.
This section on scene design is not recommended for driving a real robot!!
2.1. Start Real Robot
Drive the real robot (start in the terminal on the robot's end):
xxxxxxxxxxros2 run dofbot_ultra_driver dofbot_ultra_driver
2.2. Start MoveIt2
xxxxxxxxxxros2 launch dofbot_ultra_moveit demo.launch.py

3. Scene Design
Add a cylinder in RViz2, and have the arm grip the cylinder and move to a specified pose.
Launch Command
After MoveIt has successfully loaded and You can start planning now! appears, run the following command. The arm will plan a Cartesian path by itself (no parameters).
xxxxxxxxxxros2 run dofbot_ultra_moveit set_scene

Example Effect Explanation
Adds a cylinder collision object to the scene (default x=0.18, y=0, z=0.05, radius 0.02, height 0.08).
Controls the gripper group to execute named poses: first
open, thenclose, thenopen(these named targets must exist in SRDF).After the arm reaches the position above the grasp point and closes the gripper, the cylinder is "attached" to the end link (AttachedCollisionObject), then lifted, moved sideways, placed, and finally the gripper is opened and the object is removed.
Principle / Workflow
"Scene objects" and "attached objects" are key to handling collision relationships during grasping in MoveIt:
Objects in the scene: participate in collision planning;
Objects attached to the end effector: move with the end effector, and collision relationships between the end effector and the object are handled according to rules during planning.
When moving, Cartesian small segments (
computeCartesianPath) are attempted first, falling back to regularplan()if that fails.
Parameters (default values)
arm_group:"arm_group"gripper_group:"grip_group"object_id:"cylinder"frame_id:"base_link"eef_link:""(empty string automatically usesarm.getEndEffectorLink())open_named:"open",close_named:"close"Cylinder:
cylinder_x=0.18,cylinder_y=0.0,cylinder_z=0.05,cylinder_radius=0.02,cylinder_height=0.08Motion:
lift_z=0.10,eef_step=0.01,jump_threshold=0.0,execute_threshold=0.9
Output / Visualization
The cylinder can be seen appearing/disappearing in the RViz PlanningScene.
No additional marker topic (visualized primarily through PlanningScene).
Example Command
ros2 run dofbot_ultra_moveit set_scene --ros-args \ -p arm_group:=arm_group -p gripper_group:=grip_group \ -p frame_id:=base_link \ -p open_named:=open -p close_named:=close \ -p cylinder_x:=0.20 -p cylinder_y:=0.00 -p cylinder_z:=0.00 \ -p cylinder_radius:=0.018 -p cylinder_height:=0.07 \ -p lift_z:=0.08 -p eef_step:=0.005 -p execute_threshold:=0.95