BerkeleyAutomation / yumipy

Python control interface for interacting with the ABB YuMi Robot
Apache License 2.0
62 stars 36 forks source link

Controlling Yumi in Real-time #20

Closed masa2pleasant closed 6 years ago

masa2pleasant commented 6 years ago

Hi, first of all, thank you for sharing this wonderful work.

I am currently working on controlling Yumi with joystick. When I send target pose command through "goto_pose()", robot does move, but there is small time gap between each pose commands, even when I am sending the commands quickly: robot moves - stop for short time - robot moves ...

Is there a way to control the robot smoothly, without this small time gap between commands?

I appreciate your help.

jacky-liang commented 6 years ago

Hi,

Apologies for the really delayed response...

The way that the YuMi's RAPID API is constructed unfortunately is not very conducive to fast, real-time, smooth motions. The reason is internally, the RAPID server needs to execute a command in full (moving the end-effector to the specified pose), and stop, before executing the next command.

You can sort of get around this if you increase the zone settings by calling the yumi_robot.set_z function. For example, by calling yumi_robot.set_z('z100') will make the motions smoother by allowing the YuMi to not perform exact movements. By default the zone setting is set to 'fine', which means exact motions and no smoothing. You can see the list of zone settings here

There are trade-offs with this method however, namely that the smoothing induces a LPF of sorts that might not be ideal for your application.

The right way to do this is with Externally Guided Motions (EGM). We don't support this feature b/c the YuMi didn't support it at the time we created this package. But now ABB does support EGM on the YuMi, so I'd suggest you take a look at that first.