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: mbed AX12_Hardware
Diff: FK.h
- Revision:
- 0:8a7c1e92d067
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FK.h Sun Oct 16 16:01:08 2011 +0000
@@ -0,0 +1,49 @@
+#include "mbed.h"
+#include "AX12.h"
+
+#define B 45 // Offset dimension
+#define FEMUR 80 // Femur length
+#define TIBIA 140 // Tibia length
+#define ULNA 90 // Ulna length
+#define RADIUS 120 // Radius length
+#define X_OFFSET 25 // Distance from the X-axis -> servo centre
+#define PI 3.14159
+
+#define HIND 0
+#define FORE 1
+
+/********** Global structures **********/
+struct Joint_Angles {
+ float lateral;
+ float hip;
+ float knee;
+};
+
+/**************************************************************************
+Global variables
+**************************************************************************/
+extern AX12 Fore_Right_Hip_Lateral,
+ Fore_Right_Hip,
+ Fore_Right_Knee,
+ Fore_Left_Hip_Lateral,
+ Fore_Left_Hip,
+ Fore_Left_Knee,
+ Hind_Right_Hip_Lateral,
+ Hind_Right_Hip,
+ Hind_Right_Knee,
+ Hind_Left_Hip_Lateral,
+ Hind_Left_Hip,
+ Hind_Left_Knee;
+
+/********** Functions **********/
+void FK_Engine(float*);
+void Set_Pose(const int*, float);
+Joint_Angles IK_Engine(int, int, int, char);
+void Step_Forward(int);
+
+/************ Define Poses ************/
+extern const int Stand[];
+extern const int Sit1[];
+extern const int Sit2[];
+extern const int Sit3[];
+extern const int Sit4[];
\ No newline at end of file