Robot arm control

1 Network connection

Make sure the PC and myCobot Pro 600 are in the same local area network, taking my wifi hotspot: ElephantWIFI-5G as an example.

  • myCobot Pro 600:

  • PC:

2 Pro600 operation section

  • Make sure myCobot Pro 600 is in normal startup state in Roboflow.

  • Use the terminal command: ifconfig to obtain the actual IP address of the Raspberry Pi. In this case, the IP address of the Raspberry Pi is 192.168.10.172.

3 PC operation

3.1 Environment configuration

Download the virtual machine and virtual machine files provided by Elephant, which contains the configured virtual machine.

ROS1 virtual machine file: http://download-elephantrobotics.oss-cn-shenzhen.aliyuncs.com/system_images/ubuntu20.04_ROS1_V20230731.ova.zip

Operation video of importing virtual machine files:https://drive.google.com/file/d/1KeYk_CUgDE46rVn7zbd0EhraIbgt3qZt/view?usp=sharing

3.2 Modify the script file

Open the virtual machine and find the slider_600.py file

Get the latest slider_600.py source code from the link below and replace the old source code in the original file in the system

https://github.com/elephantrobotics/mycobot_ros/blob/noetic/mycobot_pro/mycobot_600/scripts/slider_600.py

Change the IP address in the slider_600.py file. In this case, the Raspberry Pi IP is 192.168.10.172. During user use, it needs to be filled in according to the actual IP of the user's machine. Remember to save the change after completion.

3.3 Start the simulation slider control

Start the slider control simulation model process in the PC virtual machine. The steps are as follows:

In the terminal, use the following command to load the source code:

source catkin_ws/devel/setup.bash

In the terminal, use the following command to enable the slider control:

roslaunch mycobot_600 mycobot_600_slider.launch

After successful startup, you can see the robot simulation model and a slider-controlled UI interface. You can control the robot model by dragging the slider. The value indicated in the slider is in radians. For example, the radian of joint2_to_joint1 is 3.14, which means the joint angle is 180°.

3.4 Start the real machine slider control

Before starting the real machine follow, you need to confirm 2 points to avoid the robot arm hitting other surrounding objects and people after starting the real machine follow in an abnormal posture.

  • Make sure there are no obstacles around the robot arm and it is in the zero position posture, that is, the vertical posture with the zero point label aligned
  • In the rviz simulation software, return the 6 joint sliders to zero, as shown in the figure below, you can see that the model posture is in the zero vertical posture

Open a new terminal and start the real machine tracking process. The startup command is as follows:

rosrun mycobot_600 slider_600.py

After successful startup, you can control the movement of the model in rviz and the movement of the p600 real machine by dragging the slider. Please be careful not to control it too fast to avoid damage to the robot arm.

Note: If an error message indicating that the file cannot be found appears when starting the slider to control the real machine process in a newly opened terminal, you can use the following quality to reload the source code.

source catkin_ws/devel/setup.bash

results matching ""

    No results matching ""