InverseLeg
Dependents: SwitchMode Stabilizer SwitchMode
Kinematic.h@6:444a33819962, 2016-01-23 (annotated)
- Committer:
- soulx
- Date:
- Sat Jan 23 03:42:13 2016 +0000
- Revision:
- 6:444a33819962
- Parent:
- 5:a2a5ebd65f46
-
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
soulx | 6:444a33819962 | 1 | #ifndef _KINEMATIC_H_ |
soulx | 6:444a33819962 | 2 | #define _KINEMATIC_H_ |
soulx | 4:d3bb9ead2a55 | 3 | |
icyzkungz | 2:c9c38629be85 | 4 | #include "mbed.h" |
soulx | 4:d3bb9ead2a55 | 5 | |
icyzkungz | 2:c9c38629be85 | 6 | class Kinematic |
icyzkungz | 1:d5cf0907f83d | 7 | { |
icyzkungz | 1:d5cf0907f83d | 8 | private: |
icyzkungz | 1:d5cf0907f83d | 9 | float Link_Hip; //centimeter |
icyzkungz | 1:d5cf0907f83d | 10 | float Link_Knee; //centimeter |
icyzkungz | 1:d5cf0907f83d | 11 | float Zeta_Hip; //degree |
icyzkungz | 1:d5cf0907f83d | 12 | float Zeta_Knee; //degree |
icyzkungz | 1:d5cf0907f83d | 13 | float Position_Y; //centimeter |
icyzkungz | 1:d5cf0907f83d | 14 | float Position_Z; //centimeter |
soulx | 4:d3bb9ead2a55 | 15 | |
soulx | 4:d3bb9ead2a55 | 16 | //float offset_y; |
soulx | 4:d3bb9ead2a55 | 17 | //float offset_z; |
soulx | 4:d3bb9ead2a55 | 18 | |
icyzkungz | 3:fd037c89ba5f | 19 | float zeta_knee_range_max; |
icyzkungz | 3:fd037c89ba5f | 20 | float zeta_knee_range_min; |
icyzkungz | 3:fd037c89ba5f | 21 | float zeta_hip_range_max; |
icyzkungz | 3:fd037c89ba5f | 22 | float zeta_hip_range_min; |
soulx | 4:d3bb9ead2a55 | 23 | |
soulx | 4:d3bb9ead2a55 | 24 | |
icyzkungz | 1:d5cf0907f83d | 25 | public: |
soulx | 4:d3bb9ead2a55 | 26 | Serial test; |
icyzkungz | 2:c9c38629be85 | 27 | Kinematic(float, float); |
icyzkungz | 2:c9c38629be85 | 28 | Kinematic(char, float, float, float, float); |
soulx | 6:444a33819962 | 29 | |
icyzkungz | 1:d5cf0907f83d | 30 | float get_Link_Hip() { |
icyzkungz | 1:d5cf0907f83d | 31 | return Link_Hip; |
icyzkungz | 1:d5cf0907f83d | 32 | } |
icyzkungz | 1:d5cf0907f83d | 33 | float get_Link_Knee() { |
icyzkungz | 1:d5cf0907f83d | 34 | return Link_Knee; |
icyzkungz | 1:d5cf0907f83d | 35 | } |
icyzkungz | 1:d5cf0907f83d | 36 | float get_Zeta_Hip() { |
icyzkungz | 1:d5cf0907f83d | 37 | return Zeta_Hip; |
icyzkungz | 1:d5cf0907f83d | 38 | } |
icyzkungz | 1:d5cf0907f83d | 39 | float get_Zeta_Knee() { |
icyzkungz | 1:d5cf0907f83d | 40 | return Zeta_Knee; |
icyzkungz | 1:d5cf0907f83d | 41 | } |
icyzkungz | 1:d5cf0907f83d | 42 | float get_Position_Y() { |
icyzkungz | 1:d5cf0907f83d | 43 | return Position_Y; |
icyzkungz | 1:d5cf0907f83d | 44 | } |
icyzkungz | 1:d5cf0907f83d | 45 | float get_Position_Z() { |
icyzkungz | 1:d5cf0907f83d | 46 | return Position_Z; |
icyzkungz | 1:d5cf0907f83d | 47 | } |
soulx | 4:d3bb9ead2a55 | 48 | /* |
icyzkungz | 3:fd037c89ba5f | 49 | float get_offset_y() { |
icyzkungz | 3:fd037c89ba5f | 50 | return offset_y; |
icyzkungz | 3:fd037c89ba5f | 51 | } |
icyzkungz | 3:fd037c89ba5f | 52 | float get_offset_z() { |
icyzkungz | 3:fd037c89ba5f | 53 | return offset_z; |
icyzkungz | 3:fd037c89ba5f | 54 | } |
soulx | 4:d3bb9ead2a55 | 55 | */ |
icyzkungz | 1:d5cf0907f83d | 56 | void set_Link_Hip(float); |
icyzkungz | 1:d5cf0907f83d | 57 | void set_Link_Knee(float); |
icyzkungz | 1:d5cf0907f83d | 58 | void set_Zeta_Hip(float); |
icyzkungz | 1:d5cf0907f83d | 59 | void set_Zeta_Knee(float); |
icyzkungz | 1:d5cf0907f83d | 60 | void set_Position_Y(float); |
icyzkungz | 1:d5cf0907f83d | 61 | void set_Position_Z(float); |
soulx | 4:d3bb9ead2a55 | 62 | void set_zeta_knee_range(float max,float min); |
soulx | 4:d3bb9ead2a55 | 63 | void set_zeta_hip_range(float max,float min); |
soulx | 4:d3bb9ead2a55 | 64 | |
soulx | 4:d3bb9ead2a55 | 65 | //void set_offset_YZ(float,float); |
soulx | 4:d3bb9ead2a55 | 66 | //void SumPositionWithOffset(); |
icyzkungz | 1:d5cf0907f83d | 67 | |
icyzkungz | 2:c9c38629be85 | 68 | void ForwardKinematicCalculation(); |
icyzkungz | 1:d5cf0907f83d | 69 | void InverseKinematicCalculation(); |
icyzkungz | 3:fd037c89ba5f | 70 | |
soulx | 5:a2a5ebd65f46 | 71 | void show_z(); |
soulx | 4:d3bb9ead2a55 | 72 | }; |
soulx | 4:d3bb9ead2a55 | 73 | |
soulx | 4:d3bb9ead2a55 | 74 | #endif |