# Controlling YuMi robot by serial port

I'm trying to control the YuMi robot arm by a serial port. The serial port will give the information on what direction the end-effector should move and what is the velocity. What I would like to achieve is that the robotic arm will keep moving in the certain direction and velocity until the serial command changes. For example, if the serial port tells the robotic arm to move at velocity 1 in the x-direction, the robotic arm will not stop until the serial port changes the velocity to 0.

We are currently using the 'yumipy' python library (https://github.com/BerkeleyAutomation/yumipy) for this purpose, but it might not be suitable for real-time smooth motions in our application. Because it can only generate consecutive discrete pose commands by reading the serial commands, and there will be small time gaps between each pose command. Also, the RAPID server has to execute each command in full before execute the next command (which can cause a time delay as well).

Will External Guided Motion (EGM) be suitable for this application? Are there any other possible approaches and what would be the optimal one?

• reading the serial commands where do the commands originate from? ..... it is unclear what you are trying to do – jsotola Jan 17 at 4:42
• It is from an Arduino board. @jsotola – user22088 Jan 20 at 12:00

The library allows the definition of a trajectory and adding points to the trajectory. So might be what you want to do. The exact code which achieves this is the addTrajectoryPointFront() and addTrajectoryPointBack() function in the egm_trajectory_interface.h file. It is unclear if the currently executed trajectory can be altered using the functions above or not.