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.
Diff: Leg.cpp
- Revision:
- 6:a91d18a26ba3
- Parent:
- 5:1190596b8842
--- 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)