Welcome to JetCobot repository
6.Movelt collision detection
6、Movelt collision detection
6.1、RVIZ simulation motion of robotic arm
1.Start roscore
Open the system terminal and enter the following command. If roscore is already started, you do not need to start it again.
roscore
2.Simulation Start
Open another terminal.
If it is a Jetson Nano motherboard, you need to start the virtual machine first and run the program on the virtual machine. If it is a Jetson Orin NX or Jetson Orin Nano motherboard, run the program directly in the system terminal.
Enter the following command to start the program
xxxxxxxxxxroslaunch jetcobot_moveit jetcobot_moveit.launch
3.Driving real machine
Open another terminal.
If it is a Jetson Nano motherboard, you need to start the virtual machine first and run the program on the virtual machine. If it is a Jetson Orin NX or Jetson Orin Nano motherboard, run the program directly in the system terminal.
Enter the following command to start the program
xxxxxxxxxxrosrun jetcobot_moveit sync_plan.py
Note: After the program driving the real machine is running, the robotic arm will follow the movement of the simulated robot.
Please be careful not to place other objects around to avoid being hit by the robotic arm.
4. Run program
Open another terminal.
If it is a Jetson Nano motherboard, you need to start the virtual machine first and run the program on the virtual machine. If it is a Jetson Orin NX or Jetson Orin Nano motherboard, run the program directly in the system terminal.
Enter the following command to start the program
xxxxxxxxxxrosrun jetcobot_moveit 05_attached_object.py
Code path:~/jetcobot_ws/src/jetcobot_moveit/scripts/05_attached_object.py
Experimental phenomenon: We can see that the robotic arm will make actions to avoid obstacles in RVIZ.

Close the process: Press [ctrl+c].
If it fails to close, press [ctrl+z].