Welcome to JetCobot repository
2.MoveIt control the real machine
2、MoveIt control the real machine
2.1、 Precautions
- Since the Jetson Nano development environment will report an error when running the moveit routine, the Jetson Nano version needs to run the moveit routine on the host computer. However, the program that drives the real machine runs on the Jetson Nano local system.
- The Jetson Nano supporting system needs to be in the same LAN as the Jetson Nano, and the .bahsrc file of the virtual machine needs to be modified, and the ROS_MASTER_URI in it needs to be set to the IP number of the Jetson Nano.
In the virtual machine system, run the following command to edit the .bashrc file.
vim .bashrc

2.2、Control real 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.
xxxxxxxxxxroscore
2.Start simulation
Open a new 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.Drive real robotic arm
Open a new 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.

If a prompt similar to the above appears, you can use chmod +x to give the file executable permissions before running it.
xxxxxxxxxxchmod +x /home/jetson/jetcobot_ws/src/jetcobot_moveit/scripts/sync_plan.py
4.Experimental operation and results
At this point, in the robotic arm URDF model, use the left mouse button to select the arrows in the three colors [red, green, and blue], and then drag the robotic arm, and the robot will move with the model.

Click the [Plan & Execute] button, and the real robot arm will move to the position of the robot arm clone.
