📜 ⬆️ ⬇️

Control roboruku using leap motion



Last year, I assembled a roboruku , wrote a “driver” for linux for her, taught me how to hold different objects. And somehow forgot about it. But yesterday I was given a leap motion and I came up with a new idea - to learn how to control a roboruk by means of movements of my hands.

What you need to manage


Roboruki has:

For all this, the "driver" provides a simple api:
from roboarm import Arm arm = Arm() arm.base.rotate_clock(3) arm.elbow.up(1) arm.grips.open(2) 


First implementation



')
Leap motion can detect hands , fingers and their direction.
Therefore, I decided to tie the movement to the fingers:
Part roborukiMy handNumber of fingersAxis
BaseRight4 or 5X
ShoulderLeft4 or 5Y
CubitRight2 or 3Y
WristAnyoneY
ClawsLeft2 or 3X
Nothing happened. Leap motion correctly determined when there are 1-2 fingers on a hand, but when it is greater, a random value from 1 to 5.

Second implementation



Leap motion gives the coordinates of the hands within certain limits, I have about -200 to 200 on X and from 0 to 400 on Y. I divided this area into ten equal parts and attached actions to them:
Clockwise baseShoulder upElbow upWrist upOpen claws
Base counterclockwiseShoulder downElbow downWrist downClose claws
This implementation was working =)

What happened


Video with the result, where roboruka trying to raise the box:



Video, where the movement of the hands can be seen better:



Links


Roboruk owi robotic arm.
Leap motion.
"Driver".
Source code implementation.

Source: https://habr.com/ru/post/214613/


All Articles