Welcome to JetCobot repository
9.Movelt Collision Detection
Moveit Collision Detection
1. Usage Environment
Motherboard: Jetson Orin Nano/Nx
ROS2: Humble
2. Driving the Real Machine
Driving the real machine is to convert the joint state information of the robot into the control of the real robot by subscribing to the /joint_states topic of Moveit2.
Note: Since the real robot arm does not have an obstacle avoidance function, some positions may hit obstacles; so the planned robot arm movements should be as reasonable as possible and avoid obstacles
(It is recommended to use preset positions to demonstrate driving the real machine)
2.1. Start the real machine
If you do not drive the real machine, simulate the robot arm movements in MoveIt:
xxxxxxxxxxros2 run jetcobot_driver sync_plan
2.2. Start MoveIt2
xxxxxxxxxxros2 launch jetcobot_moveit demo.launch.py

3. Collision detection
After the program runs, RViz2 will add a rectangular obstacle next to the robot arm, and the robot arm will be planned to the program target position. The entire planning and execution process will automatically avoid obstacles.
3.1, Visualization
Before starting the command, you need to add the MarkerArray plug-in in RViz2 to display the planned path: MarkerArray needs to select the arm_group topic


3.2, Start the command
The robot needs to be successfully loaded in MoveIt and You can start planning now! appears to run the following command: The robot will automatically avoid the rectangular planning and execute to the specified position
xxxxxxxxxxros2 run jetcobot_moveit obstacle_avoidance

