Archive | July 2013

One Giant LEAP For Robotkind

Finaly my long awaited Leap Motion pre-order arrived so I decided to see what I could do with it.

After playing with some of the demo programs I noticed on there was a Processing library on the leap developer site (can be found here). The control program for my hexapod is already written in processing so adding the leap was relatively easy.

All I have done currently is map x, y, z, yaw, pitch & roll of the users hand onto the body of the hexapod. The smoothing and inverse kinematics are then done and sent to the hexapod over TCP/IP. Raspberry Pi on the hexapod receives this with a python script and outputs the values to the servos.  Hand tracking with the Leap is enabled or disabled by a key tap gesture with any finger.

To add this to my code it was as easy as including the library at the top of the sketch:

import de.voidplus.leapmotion.*;
LeapMotion leap;

Then initialising the leap in void setup()

leap = new LeapMotion(this).withGestures("key_tap");

and setting position from the Leap in main:

if (enableLeap == true){
 for(Hand hand : leap.getHands()){
  PVector hand_position = hand.getPosition();

  HexapodOrientationYaw = hand.getYaw();
  HexapodOrientationPitch = hand.getPitch();
  HexapodOrientationRoll = hand.getRoll();

  HexapodPositionX = hand_position.x;
  HexapodPositionY = hand_position.y;
  HexapodPositionZ = hand_position.z;

Turning the Leap control on and of is done by a seprate function which runs when a gesture is recognised.

void leapOnKeyTapGesture(KeyTapGesture g){
 enableLeap=!enableLeap; //toggle Leap on/off
 delay(200); //small debounce

When I get some time I hope to add the ability to use both hands to control the front two legs. This will allow for manipulation of objects through the Leap

Project Phoenix – Its All Over, But How Did We Do?

Now that SAUC-e is over and the team have had some time to recover i feel that a large post is in order to let you know how we got on. This will cover our journey from beginning to end, including the highs and lows, starting from when we left Bristol. (Warning – long read – picture heavy)

v v v   Click read more to see full post.   v v v

Read More…