Control the most compact compound robot to do intelligent sorting project

,

Introduction

Our theme is to break the distance limit of the collaborative robotic arm and connect it with the mobile robot (myAGV) to realize a case.

The two devices we are going to use today are:

1 mechArm 270-M5Stack:

mechArm 270-M5Stack is the most compact six-axis robotic arm with an industrial-like configuration launched by Elephant Robotics. It’s tough but reliable for its centrosymmetric structure, and its effectiveness enables users to increase programming efficiency with reliability.

2 myAGV:
myAGV is the first mobile robot of Elephant Robotics. It adopts competition-grade Mecanum wheels and fully wraps the metal frame. The ROS development platform has two built-in slam algorithms ta o meet the learning of mapping and navigation directions. It provides rich expansion interfaces and can be equipped with robotic arms(myCobot280,mechArm270,myPalletizer260 ).

Case

What we want to achieve today is the case of the combination of mechArm270-M5Stack and myAGV as a compound robot by controlling the myAGV to move to the designated position and then controlling the mechArm270 M5Stack to grab the wooden block myAGV and move it to the designated position.

Demo

Connection

To bring two robots together, they must first be connected. There are two ways to establish the connection:

● Wireless connection (TCP/IP)

Let myAGV establish contact through the IP address of the mechArm 270-M5Stack. First, set them in the same WiFi network environment, and obtain the IP address of the mechArm 270 M5Stack. When the team designed the M5Stack Basic, Elephant Robot designed the function of displaying the IP address, which can quickly obtain the IP address. (Port defaults to 9000)

Briefly introduce the socket method: a function used to establish communication in python, which can send information to each other.
The elephant robot has an open source library, pymycobot, which encapsulates a MyCobotSocket() method, similar to the socket method, to send instructions to the robotic arm.
Code:

from pymycobot import MyCobotSocket
# MyCobotSocket(IP,port) port defaults to 9000
mc = MyCobotSocket("192.168.10.22","9000")

#After the normal connection, you can send commands to the robot arm, such as returning the robot arm to the origin.
mc.send_angles([0,0,0,0,0,0],20)
#Get the angle information of the current robotic arm.
res = mc.get_angles()
print(res)

● Wired connection

The wired connection is relatively easy. Plug in a type-C data cable to connect to myAGV, then we can control the robotic arm.

Note: After connecting, because of the rules of the Ubuntu system, we need to grant permissions to the robotic arm’s serial port to operate normally.
Type in the terminal

sudo chmod 777 /dev/tty***(***refers to the serial port number of the robotic arm)

Control

Let myAGV move

Once connected, we can start controlling this compound robot.

In the movement of myAGV, the elephant robotics provides two control methods: keyboard control and PS2 handler control.

The ros language controls it. (below is how to do it)

Keyboard control:

Start Node:

Enter the command in the terminal.

roslaunch myagv_odometry myagv_active.launch

p2
Open the keyboard control interface
Enter the command in the terminal.

roslaunch myagv_teleop myagv_teleop.launch

1.4
Press the corresponding button on the keyboard to make myAGV move.

myAGV uses a Mecanum wheel that can move in all directions and an IMU for positioning compensation. It can be turned around on the spot, and the control is very easy.

PS2 handler control:

The first step is to start the node, and the second control program is to open the PS2 handler.

Enter the command in the terminal.

roslaunch myagv_ps2 myagv_ps2.launch

After running, can freely control myAGV through the PS2 handler.

Implementation of the case

Grab the block with the robotic arm and put it into the corresponding bucket.

Combining the control of the mobile robot and the control of the robotic arm, this project can be realized.

First, start the mobile control of myAGV with either keyboard control or PS2 handler control. I choose PS2 handler control here. Move the robotic arm in front of the small piece of wood, send code to mechArm to control its movement, and control the gripper to grab the piece of wood. It is placed in the corresponding location.

Code for mechArm 270 M5Stack:

from pymycobot import MyCobotSocket

mc = MyCobotSocket("192.168.10.22","9000")

mc.send_angles([0,0,0,0,0,0],50)
time.sleep(2)
mc.send_angles([1.75,58.53,29.44,4.92,(-77.69),5.09],50)
time.sleep(2)
mc.send_angles([1.75,76.02,(-25.31),12.3,(-61.61),(-2.81)],50)
time.sleep(2)
mc.set_gripper_state(0, 80)
time.sleep(1)
mc.set_gripper_value(50,80)
time.sleep(1)
mc.send_angles([2.37,(-2.1),(-9.66),9.66,68.64,(-33.13)],50)
time.sleep(2)
mc.send_angles([2.81,48.77,(-10.1),2.63,(-55.72),(-30.32)],50)
time.sleep(1)
mc.set_gripper_state(0, 80)

Summary

I don’t know what you think about this case, if you have any ideas or opinions, please leave a message below! I’ll take interesting suggestions to try!
More information:
Home | Elephantrobotics
Gitbook | Elephantrobotics
GitHub | Open-Source

1 Like

I posted in the other thread. Here is a photo of the two robots of yours I have. Unfortunately I’ve found them to be not that useful for my purposes because of the slow joint control rate possible through the serial interface. I would be happy to try to improve the control rate but the firmware is sadly closed source.

2 Likes

Hi I’ve replied to you in another thread, thanks for the feedback.