Welcome to JetCobot repository
3.Moves randomly
3、Moves randomly
3.1、Introduction
The random movement function may plan unreasonable postures, please drive the real machine carefully.
3.2、Start
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
Reopen a 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
Reopen a terminal.
If it is a Jetson Nano board, you need to run the program on Jetson Nano. If it is a Jetson Orin NX or Jetson Orin Nano board, 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 a new terminal.
If it is a Jetson Nano motherboard, you need to run the program on a 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 01_random_move.py
Code path :jetcobot_ws/src/jetcobot_moveit/scripts/01_random_move.py
Experimental phenomenon: We can see that the robotic arm in rviz will randomly search for the target point and move.

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