Library to control a 3DOF robotic leg. Specify an [x,y,z] co-ordinate and the library will solve the inverse kinematic equations to calculate the required servo pulse widths to position the foot at the target location.

Dependencies:   Utils

Files at this revision

API Documentation at this revision

Comitter:
eencae
Date:
Mon May 25 15:04:57 2015 +0000
Parent:
5:1190596b8842
Commit message:
Added default robotic leg dimensions.

Changed in this revision

Leg.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 1190596b8842 -r a91d18a26ba3 Leg.cpp
--- a/Leg.cpp	Mon May 25 14:14:23 2015 +0000
+++ b/Leg.cpp	Mon May 25 15:04:57 2015 +0000
@@ -18,6 +18,11 @@
     coxa_servo->period(1.0/50.0);  // servos are typically 50 Hz
     // setup USB serial for debug/comms
     //serial = new Serial(USBTX,USBRX);
+    
+    coxa_length_ = 28.0;
+    femur_length_ = 58.0;
+    tibia_length_ = 125.0;
+    
 }
 
 vector_t Leg::solve_inverse_kinematics(float x, float y, float z)