Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope MODSERIAL QEI biquadFilter mbed
Fork of Robot-Software_jesse by
Diff: help_functions/kinematics.h
- Revision:
- 7:b77f2201b156
- Parent:
- 6:8ff9566c91e2
- Child:
- 8:bba05e863b68
--- a/help_functions/kinematics.h Mon Oct 22 19:13:37 2018 +0000
+++ b/help_functions/kinematics.h Tue Oct 23 05:28:32 2018 +0000
@@ -8,13 +8,15 @@
void 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);
- y = y01 + L1 * cos(q1) + L2 * sin(q1 + q2);
+ x = x01 + L1*cos(q1)-L2*cos(q2);
+ y = y01 + L1 * sin(q1) - L2 * sin(q2);
}
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
+ // I assume here that reference is a vector (this should also be global I think)
+
return 5.5;
}
\ No newline at end of file
