Biorobotics / Robot-Software

Dependencies:   HIDScope MODSERIAL QEI biquadFilter mbed Servo

Revision:
3:40e0e9404f82
Parent:
2:17ed767d8394
Child:
4:88d28354e023
diff -r 17ed767d8394 -r 40e0e9404f82 help_functions/kinematics.h
--- a/help_functions/kinematics.h	Mon Oct 22 19:04:51 2018 +0000
+++ b/help_functions/kinematics.h	Mon Oct 22 19:09:19 2018 +0000
@@ -6,7 +6,7 @@
 double y01 = 0.2;
 double q1,q2,x,y;
 
-float forwardkinematics_function(double q1, double q2) {
+double forwardkinematics_function(double q1, double q2) {
     // input are joint angles, output are x and y position of end effector
     
     x = x01 - L1 * sin(q1) + L2 * cos(q1 + q2);
@@ -14,7 +14,7 @@
     return x;    
 }
 
-float inversekinematics_function(double reference) {
+double inversekinematics_function(double q1, double q2, double reference) {
     // pseudo inverse jacobian to get joint speeds
     // input are desired vx and vy of end effector, output joint angle speeds