How to control cobot arm on Limo in both ROS1 and ROS2?

Limo Cobot is a Limo series robot equipped with a cobot arm base on Limo Pro base. More details please visit: LIMO PRO – Agilex Robotics

Limo Cobot(Pro) can be integrated with both ROS1 and ROS2. In this project the instructions of how to control cobot robotic arm in both ROS1 and ROS2 will be introduced.

Set connection between robot and arm

The Cobot robot has two control methods.

First, you can directly call the API interface to control the robot by assigning six joint angles. This method allows users to directly specify the robot’s motion trajectory and posture, thereby accurately controlling its movements.

Second, Cobot also supports control using MoveIt. Users can set the target point, and MoveIt calculates the six joint angles and sends these angles to the robot. This method is more flexible and can achieve more complex motion planning and control by setting the target point, while also being able to adapt to different work scenarios and needs.

Whether calling the API interface directly or using MoveIt, the Cobot robot can provide efficient and accurate robot control to meet the needs of users in different scenarios.

Open the robot and enter the following interface, where communication configuration is required. Select Transponder and click OK.

Then, choose USB UART and click ok.

When ‘Atom:ok’ shows, the connection is successfull.

Control cobot robotic arm:

Control the Robot Arm Using Sliders

Start the slider control node. Open a new terminal, and enter the command in the terminal:

ros2 launch mycobot_280 port:=/dev/ttyACM0 baud:=115200

In ros1, please run:

roslaunch mycobot_280 slider_control.launch

and then, run

rosrun mycobot_280 _port:=/dev/ttyACM0 _baud:=115200

to start the real arm.

The angles of the six axes of the real robot arm can be controlled through the slider control interface.

The model follows the real robot arm

To start the model following the robot arm function, open a new terminal and enter:

 ros2 launch mycobot_280 

In ros1:
Start the robot model, open a new terminal, and enter in the terminal:

roslaunch mycobot_280 mycobot_follow.launch

Start the model follow node:

rosrun mycobot_280 _port:=/dev/ttyACM0 _baud:=115200

After successful startup, the robot arm will be unlocked. At this time, you can use your hand to bend the robot arm, and the model in rviz will follow and move.

Return back to rivz. The model in rviz will follow the real robotic arm.

GUI control robotic arm

Use a simple GUI interface to control the movement of the robotic arm. Start a new terminal and enter the command in the terminal:

ros2 launch mycobot_280

In ros1, run:

roslaunch mycobot_280 simple_gui.launch

After starting up successfully, you can enter the angle information or position information of each joint in the GUI interface.

After setting the angle of the robot arm axis, click the SET button and the robot arm will move to the set position. JAW and pimp are the switches corresponding to the gripper and suction pump device respectively.

Keyboard control

ros2 launch mycobot_280

After running this, a interface will appear.

Next, open another terminal and run:

ros2 run mycobot_280 teleop_keyboard

You can see the output:

Mycobot Teleop Keyboard Controller
Movimg options(control coordinations [x,y,z,rx,ry,rz]):

    a(y-)     s(x-)     d(y+)

    z(z-) x(z+)

u(rx+)   i(ry+)   o(rz+)
j(rx-)   k(ry-)   l(rz-)

Gripper control:
    g - open
    h - close

    1 - Go to init pose
    2 - Go to home pose
    3 - Resave home pose
    q - Quit

currently:    speed: 10    change percent: 2

In this terminal, you can control the state of the robot arm and move the robot arm by pressing keys in the terminal.

In ros1:
Use the keyboard to control the machine. Open a new terminal and enter the following in the terminal:

roslaunch mycobot_280 teleop_keyboard.launch

Wait for the terminal to display ready and then open a command line:

rosrun mycobot_280

After the startup is successful, you can use the keys w a s d to control the movement of the robot arm.

Moveit control

Open a new terminal and run:

ros2 launch mycobot_280_moveit 

After running, the following RVIZ interface will appear:

To control the real robot arm through Moveit, you need to enable another command:

ros2 run mycobot_280 sync_plan 

Then you can drag the model on the Moveit to control the real robotic arm.

In ros1:
Start the moveit robot control node, open a new terminal, and enter in the terminal:

roslaunch limo_cobot_moveit_config demo.launch

Start the real robot synchronization node:

rosrun mycobot_280_moveit _port:=/dev/ttyACM0 _baud:=115200

Move and grab in ROS1

In the mobile grabbing function, use move_base to navigate the Limo robot to the target point location. Once the robot reaches the target position, it triggers the robot arm to perform a grabbing motion by calling the API interface of the robot arm, realizing the complete process of the mobile grabbing function. This combination of navigation and robotic arm control allows the robot to move in dynamic environments and perform grasping tasks.

(1)Open a new terminal, and enter the command to launch the LiDAR:

roslaunch limo_bringup limo_start.launch pub_odom_tf:=false

(2)Open a new terminal, and enter the command to start the navigation.

roslaunch limo_bringup limo_navigation_diff.launch

Record first position.

Drive Limo to the grabbing location and record the second location.

Fill in the data in /home/agilex/agilex_ws/src/set_nav_point/ as shown in the figure.
First one:

Second one:

(3)Start the mobile grabbing function node. Open a new terminal, and enter the command in the terminal:

rosrun set_nav_point

After successful startup, Limo will go to the grabbing location. After arriving, the robotic arm will perform the grabbing action.

About Limo

If you are interested in Limo or have some technical questions about it, feel free to join AgileX Robotics or AgileX Robotics. Let’s talk about it!


Thanks for sharing this case.