Class to drive a Hexapod Robot using two PCA9685 PWM Driver boards.
Dependencies: Gait Hexapod_Leg PCA9685 Tripod
Angles/angles_X.h@0:c15ca34340a7, 2016-05-03 (annotated)
- Committer:
- el13cj
- Date:
- Tue May 03 15:54:32 2016 +0000
- Revision:
- 0:c15ca34340a7
- Child:
- 1:24ba9327c9ee
WORKING FULLY BEFORE ADDING GAIT DIRECTIONS
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el13cj | 0:c15ca34340a7 | 1 | #ifndef HEXAPOD_LEG_ANGLES_X_H |
el13cj | 0:c15ca34340a7 | 2 | #define HEXAPOD_LEG_ANGLES_X_H |
el13cj | 0:c15ca34340a7 | 3 | #include "structs.h" |
el13cj | 0:c15ca34340a7 | 4 | |
el13cj | 0:c15ca34340a7 | 5 | struct leg_sequence |
el13cj | 0:c15ca34340a7 | 6 | |
el13cj | 0:c15ca34340a7 | 7 | { |
el13cj | 0:c15ca34340a7 | 8 | leg_x_angles; |
el13cj | 0:c15ca34340a7 | 9 | |
el13cj | 0:c15ca34340a7 | 10 | }; |
el13cj | 0:c15ca34340a7 | 11 | |
el13cj | 0:c15ca34340a7 | 12 | |
el13cj | 0:c15ca34340a7 | 13 | leg_x_angles leg_1_angles[5] = |
el13cj | 0:c15ca34340a7 | 14 | { |
el13cj | 0:c15ca34340a7 | 15 | {-81.103,9.871,-101.508}, //POSITION 1 |
el13cj | 0:c15ca34340a7 | 16 | {-81.103,31.098,-119.675}, // |
el13cj | 0:c15ca34340a7 | 17 | {-45.000,30.471,-125.723}, // |
el13cj | 0:c15ca34340a7 | 18 | {-8.897,31.098,-119.675}, // |
el13cj | 0:c15ca34340a7 | 19 | {-8.897,9.871,-101.508}, //POSITION 5 |
el13cj | 0:c15ca34340a7 | 20 | }; |
el13cj | 0:c15ca34340a7 | 21 | |
el13cj | 0:c15ca34340a7 | 22 | leg_x_angles leg_2_angles[5] = |
el13cj | 0:c15ca34340a7 | 23 | { |
el13cj | 0:c15ca34340a7 | 24 | {0,9.708,-96.502}, //POSITION 1 |
el13cj | 0:c15ca34340a7 | 25 | {-22.834,9.033,-92.554}, // |
el13cj | 0:c15ca34340a7 | 26 | {-22.834,29.089,-109.885}, // |
el13cj | 0:c15ca34340a7 | 27 | {22.834,29.089,-109.885}, // |
el13cj | 0:c15ca34340a7 | 28 | {22.834,9.033,-92.554} //POSITION 5 |
el13cj | 0:c15ca34340a7 | 29 | }; |
el13cj | 0:c15ca34340a7 | 30 | |
el13cj | 0:c15ca34340a7 | 31 | leg_x_angles leg_3_angles[5] = |
el13cj | 0:c15ca34340a7 | 32 | { |
el13cj | 0:c15ca34340a7 | 33 | {-8.897, 9.871,-101.508}, //POSITION 1 |
el13cj | 0:c15ca34340a7 | 34 | {-8.897,31.098,-119.675}, // |
el13cj | 0:c15ca34340a7 | 35 | {-45.000,30.471,-125.723}, // |
el13cj | 0:c15ca34340a7 | 36 | {-81.103,31.098,-119.675}, // |
el13cj | 0:c15ca34340a7 | 37 | {-81.103,9.871,-101.508} //POSITION 5 |
el13cj | 0:c15ca34340a7 | 38 | }; |
el13cj | 0:c15ca34340a7 | 39 | |
el13cj | 0:c15ca34340a7 | 40 | |
el13cj | 0:c15ca34340a7 | 41 | typedef const struct leg_sequence sequence; |
el13cj | 0:c15ca34340a7 | 42 | |
el13cj | 0:c15ca34340a7 | 43 | leg_sequence sequence = |
el13cj | 0:c15ca34340a7 | 44 | |
el13cj | 0:c15ca34340a7 | 45 | { |
el13cj | 0:c15ca34340a7 | 46 | leg_1_angles, |
el13cj | 0:c15ca34340a7 | 47 | leg_2_angles, |
el13cj | 0:c15ca34340a7 | 48 | leg_3_angles, |
el13cj | 0:c15ca34340a7 | 49 | leg_4_angles, |
el13cj | 0:c15ca34340a7 | 50 | leg_5_angles, |
el13cj | 0:c15ca34340a7 | 51 | leg_6_angles |
el13cj | 0:c15ca34340a7 | 52 | }; |
el13cj | 0:c15ca34340a7 | 53 | |
el13cj | 0:c15ca34340a7 | 54 | |
el13cj | 0:c15ca34340a7 | 55 | |
el13cj | 0:c15ca34340a7 | 56 | #endif |