Class to drive a Hexapod Robot using two PCA9685 PWM Driver boards.

Dependencies:   Gait Hexapod_Leg PCA9685 Tripod

Committer:
el13cj
Date:
Wed May 11 15:47:09 2016 +0000
Revision:
3:82ac75ea08a7
Parent:
1:24ba9327c9ee
Ready

Who changed what in which revision?

UserRevisionLine numberNew 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 1:24ba9327c9ee 5 struct angles
el13cj 0:c15ca34340a7 6
el13cj 0:c15ca34340a7 7 {
el13cj 1:24ba9327c9ee 8 leg_x_angles angle[5];
el13cj 0:c15ca34340a7 9
el13cj 0:c15ca34340a7 10 };
el13cj 0:c15ca34340a7 11
el13cj 0:c15ca34340a7 12
el13cj 1:24ba9327c9ee 13 leg_x_angles leg_x1_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 1:24ba9327c9ee 22 leg_x_angles leg_x2_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 1:24ba9327c9ee 31 leg_x_angles leg_x3_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
el13cj 1:24ba9327c9ee 42 leg_x_angles leg_all_angles[3][5] =
el13cj 1:24ba9327c9ee 43 {
el13cj 1:24ba9327c9ee 44 {{-8.897, 9.871,-101.508},{-8.897,31.098,-119.675},{-45.000,30.471,-125.723},{-81.103,31.098,-119.675},{-81.103,9.871,-101.508}},
el13cj 1:24ba9327c9ee 45 {{-8.897, 9.871,-101.508},{-8.897,31.098,-119.675},{-45.000,30.471,-125.723},{-81.103,31.098,-119.675},{-81.103,9.871,-101.508}},
el13cj 1:24ba9327c9ee 46 {{-8.897, 9.871,-101.508},{-8.897,31.098,-119.675},{-45.000,30.471,-125.723},{-81.103,31.098,-119.675},{-81.103,9.871,-101.508}}
el13cj 1:24ba9327c9ee 47
el13cj 1:24ba9327c9ee 48 };
el13cj 1:24ba9327c9ee 49
el13cj 1:24ba9327c9ee 50 typedef const struct angles leg_sequence;
el13cj 1:24ba9327c9ee 51 /*
el13cj 1:24ba9327c9ee 52 leg_sequence sequence[3] =
el13cj 0:c15ca34340a7 53
el13cj 0:c15ca34340a7 54 {
el13cj 1:24ba9327c9ee 55 {leg_x1_angles, leg_x2_angles, leg_x3_angles}
el13cj 1:24ba9327c9ee 56
el13cj 0:c15ca34340a7 57 };
el13cj 0:c15ca34340a7 58
el13cj 0:c15ca34340a7 59
el13cj 1:24ba9327c9ee 60 */
el13cj 0:c15ca34340a7 61 #endif