Biorobotics / Robot-Software

Dependencies:   HIDScope MODSERIAL QEI biquadFilter mbed Servo

Revision:
2:17ed767d8394
Parent:
0:4cb1de41d049
Child:
3:40e0e9404f82
--- a/help_functions/kinematics.h	Mon Oct 22 13:02:29 2018 +0000
+++ b/help_functions/kinematics.h	Mon Oct 22 19:04:51 2018 +0000
@@ -6,10 +6,8 @@
 double y01 = 0.2;
 double q1,q2,x,y;
 
-float forwardkinematics_function(double motor_angle) {
+float forwardkinematics_function(double q1, double q2) {
     // input are joint angles, output are x and y position of end effector
-    q1 = motor_angle;
-    q2 = motor_angle;
     
     x = x01 - L1 * sin(q1) + L2 * cos(q1 + q2);
     y = y01 + L1 * cos(q1) + L2 * sin(q1 + q2);