Austin Mitchell / Mbed 2 deprecated RobotFightingControl

Dependencies:   mbed PinDetect

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ik.h Source File

ik.h

00001 /* meArmIK - York Hackspace May 2014
00002  * Inverse Kinematics solver for three degrees of freedom
00003  * created for Phenoptix' meArm robot arm
00004  */
00005 #ifndef IK_H_INCLUDED
00006 #define IK_H_INCLUDED
00007 
00008 extern float L1, L2, L3;
00009 
00010 // Get polar coords from cartesian ones
00011 void cart2polar(float a, float b, float& r, float& theta);
00012 
00013 // Get angle from a triangle using cosine rule
00014 bool cosangle(float opp, float adj1, float adj2, float& theta);
00015 
00016 // Solve angles!
00017 bool solve(float x, float y, float z, float& a0, float& a1, float& a2);
00018 
00019 #endif // IK_H_INCLUDED