myCobot 280 2023 new functions of the robotic arm, handle control, self-interference detection

introduction

A robotic arm is a programmable, automated mechanical system that can simulate human actions to complete various tasks, such as assembly, spraying, packaging, handling, welding, grinding, etc. Due to its high flexibility and versatility, robotic arms have been widely used in modern society.

myCobot 280 M5Stack 2023 is a high-performance desktop robotic arm. Its powerful functions and various new features make it an ideal choice for education, scientific research, and light manufacturing. The robotic arm not only has precise motion control and efficient working ability, but also supports ROS2 environment adaptation, ps2 handle control, self-interference collision and other new functions, which make the robotic arm more intelligent, flexible and safe. This article will introduce the new functions and application scenarios of myCobot280 2023 in detail, help readers understand the characteristics and advantages of this robotic arm, and explore how to realize its potential in the fields of education, scientific research, and manufacturing.

Introduction to myCobot280 2023

myCobot 280 is a lightweight desktop robotic arm product, weighing less than 800 grams, with a repeatable positioning accuracy within 0.5 mm, a load capacity of 250 grams, and a working radius of 280 mm. The robotic arm has rich interfaces and supports mainstream programming languages ​​and environments, such as Python, C++, ROS1/2, etc. This makes it very suitable for use in education, scientific research, and other fields.

new function

myCobot 280 2023 has the following new features:

(If you are currently using a first generation myCobot 280, you can upgrade the firmware to access new features.

● Improved communication speed and ROS2 support

● Self-interference collision and handle control

● Research on compound robot and logistics automation

Improved communication speed and ROS2 support

● The communication speed of myCobot 280 2023 is five times faster than the previous version, and now it can reach 20ms. This improvement could improve the responsiveness of the robotic arm, make the control more sensitive, and reduce accidents caused by communication. Robots can also move faster, reducing accidents.

myCobot 280 2023 now supports the ROS2 environment, which differs from ROS1 in two ways. First, ROS2 improves real-time performance, allowing more precise control of the robot's motion path and speed. This is suitable for applications requiring high real-time performance. Second, ROS2 uses the Data Distribution Service (DDS) protocol, which improves network communication performance compared to ROS1, making it more efficient in processing robot control commands and improving robot response speed. However, ROS1 has been widely used in the field of robotics, and has a relatively complete control library and development environment, making it easy to develop and apply robot-related software. ROS2 is relatively new and has fewer applications in the market. Therefore, when users choose a control development environment, they need to consider their specific needs and actual conditions, and choose the most suitable one.

● Self-interfering collision and handle control

○ Self-interference collision: A new self-interference collision function has been added. This function can make the body stop moving immediately when a joint collision occurs, and will not continue to move and cause the robot arm to lose power. This function can effectively avoid damage caused by abnormal conditions in the working process of the robot arm, and improves the safety and reliability of the robot arm.

By collecting user feedback and meeting the expectations of the developers for the product, this technology can be said to have solved a problem to a large extent. In the past, if the mechanical arm joints were forced to collide, the entire machine would perform power-down protection. , it needs to be powered on again to restore the control, which has caused troubles for many users.

At present, this technology is not open source, so the algorithm and principle cannot be revealed too much.

● There is also a gamepad control function, which allows users to use a PS2 game controller to control the movement and operation of the robot, and also adds control of suction cups and grippers. This feature simplifies the programming process and improves the user experience. The handle control function is based on a set of Python programs that introduce the Pygame library to set the controller's key (equivalent to a custom handle). This is a relatively simple project that anyone interested can build upon. The project is open source and shared on GitHub.

def main():
 global action
    pygame.init()
    pygame.joystick.init()
 try:
        joystick = pygame.joystick.Joystick(0)
 except:
 print("Please connect the handle first.")
 return
    joystick.init()
    done = False
    start_time = 0
 while not done:
 for event_ in pygame.event.get():
 if event_.type == pygame.QUIT:
                done = True
 # 按键按下或弹起事件
 elif (
                event_.type == pygame.JOYBUTTONDOWN or event_.type == pygame.JOYBUTTONUP
 ):
                buttons = joystick.get_numbuttons()
 # 获取所有按键状态信息
 for i in range(buttons):
                    button = joystick.get_button(i)
 if i == 7:
 if button == 1:
                            action = 7
 break
 else:
                            action = 0
 if i == 1:
 if button == 1:
                            action = 11
 break
 if i == 0:
 if button == 1:
                            action = 10
 break
 if i == 3:
 if button == 1:
                            action = 9
 break
 if action == 9 and button == 0:
                            action = 0
 break
 if i == 2:
 if button == 1:
                            action = 8
 break
 if action == 8 and button == 0:
                            action = 0
 break
 if i == 4:
 if button == 1:
                            action = 18
                            start_time = time.time()
 break
 if start_time != 0 and button == 0:
 if time.time() - start_time > 2:
                                start_time = 0
 break
 else:
                                start_time = 0
                                action = 0
 if i == 5:
 if button == 1:
                            action = 21
                            start_time = time.time()
 break
 if start_time != 0 and button == 0:
 if time.time() - start_time > 2:
                                start_time = 0
 break
 else:
                                start_time = 0
                                action = 0
 # print("button " + str(i) + ": " + str(button))
 # 轴转动事件
 elif event_.type == pygame.JOYAXISMOTION:
                axes = joystick.get_numaxes()
 # 获取所有轴状态信息
 # while True:
 for i in range(axes):
                    axis = joystick.get_axis(i)
 # res[i] = axis
 if i == 1:
 if axis < -3.0517578125e-05:
                            action = 1
 break
 elif axis > -3.0517578125e-05:
                            action = 2
 break
 else:
                            action = 0
 if i == 0:
 if axis < 0:
                            action = 3
 break
 elif axis > 0:
                            action = 4
 break
 else:
                            action = 0
 if i == 2:
 if axis < 0:
                            action = 17
 break
 elif axis > 0:
                            action = 16
 break
 else:
                            action = 0
 if i == 3:
 if axis < -3.0517578125e-05:
                            action = 5
 break
 elif axis > -3.0517578125e-05:
                            action = 6
 break
 else:
                            action = 0
 if i == 4:
 if axis > 0.9:
                            action = 19
                            start_time = time.time()
 break
 if start_time != 0 and axis == -1.0:
 if time.time() - start_time > 2:
                                start_time = 0
 break
 else:
                                start_time = 0
                                action = 0
 if i == 5:
 if axis > 0.9:
                            action = 20
                            start_time = time.time()
 break
 if start_time != 0 and axis == -1.0:
 if time.time() - start_time > 2:
                                start_time = 0
 break
 else:
                                start_time = 0
                                action = 0
 # print("axis " + str(i) + ": " + str(axis))
 # 方向键改变事件
 elif event_.type == pygame.JOYHATMOTION:
 # hats = joystick.get_numhats()
 # 获取所有方向键状态信息
 # for i in range(hats):
                hat = joystick.get_hat(0)
 # print("hat " + str(i) +": " + str(hat))
 if hat == (0, 1):
                    action = 12
 elif hat == (0, -1):
                    action = 13
 elif hat == (-1, 0):
                    action = 14
 elif hat == (1, 0):
                    action = 15
 elif hat == (0, 0):
                    action = 0
    pygame.quit()

copy

copy

It is a relatively simple project. If you are interested, you can develop it again on this basis.

The project is open source and has been shared on GitHub, links:

pymycobot/demo/handle_control at main · elephantrobotics/pymycobot · GitHub

Research on Composite Robot and Logistics Automation

● myCobot 280 2023 can also be combined with the SLAM radar vehicle myAGV controlled by Raspberry Pi 4B to form a composite robot that can learn and research logistics automation, navigation and other functions. This function makes the robot more flexible and versatile when dealing with different scenarios and tasks, and improves its comprehensive application ability.

● myAGV: Regarding vehicles, there are many introduction articles on the hackster website, and some developers use myAGV and myCobot 280 to realize some projects.

Summarize

Overall, myCobot 280 2023 is a robotic arm with multiple new features and improvements that greatly enhance its performance and application range. In addition to improving communication speed, supporting ROS2, and avoiding self-interference collisions, we also launched AI Kit 2023, which combines machine vision with robotic arms to realize industrial-like automation scenarios and make robotic arms more widely and diversely used.

In addition, myCobot 280 2023 has many other functions waiting for you to explore, such as drawing, AI sorting and grasping, etc., which will further expand the application range and innovation of the robotic arm. If you have better projects and ideas, please feel free to share them with us. We are very happy to hear your suggestions to provide you with better service.

If you have any other questions or concerns, please feel free to contact us. We'd love to help you.

Guess you like

Origin blog.csdn.net/m0_71627844/article/details/131516750