Alex exoskeleton
ALEX SoftwareDocumentation
RobotParams.h
Go to the documentation of this file.
1 
8 #ifndef ROBOT_PARAMS_H
9 #define ROBOT_PARAMS_H
10 
11 //#define _NOANKLES //w / o ankles
12 #ifndef _NOANKLES
13 #define NUM_JOINTS 6
14 #else
15 #define NUM_JOINTS 4
16 #endif
17 // Macros
18 #define deg2rad(deg) ((deg)*M_PI / 180.0)
19 #define rad2deg(rad) ((rad)*180.0 / M_PI)
20 //Node ID for the 6 joints
22  LEFT_HIP = 0,
23  LEFT_KNEE = 1,
24  RIGHT_HIP = 2,
28 };
29 
30 enum class RobotMode {
31  NORMALWALK,
32  SITDWN,
33  STNDUP,
34  UPSTAIR,
35  DWNSTAIR,
36  TILTUP,
37  TILTDWN,
38  BKSTEP,
39  FTTG,
40  UNEVEN,
41  INITIAL
42 };
43 
44 const double Q_MIN_MAX[12]{deg2rad(70), deg2rad(210),
45  0, deg2rad(120),
46  deg2rad(70), deg2rad(210),
47  0, deg2rad(120),
48  deg2rad(75), deg2rad(105),
49  deg2rad(75), deg2rad(105)};
50 
51 //Params for specific robt
52 //Knee motor reading and corresponding angle. Used for mapping between degree and motor values.
53 #define KNEE_MOTOR_POS1 (250880)
54 #define KNEE_MOTOR_DEG1 (90)
55 #define KNEE_MOTOR_POS2 (0)
56 #define KNEE_MOTOR_DEG2 (0)
57 //Hip motor reading and corresponding angle. Used for mapping between degree and motor values.
58 #define HIP_MOTOR_POS1 (250880)
59 #define HIP_MOTOR_DEG1 (90)
60 #define HIP_MOTOR_POS2 (0)
61 #define HIP_MOTOR_DEG2 (180)
62 //Ankle motor reading and corresponding angle. Used for mapping between degree and motor values.
63 #define ANKLE_MOTOR_POS1 (0)
64 #define ANKLE_MOTOR_DEG1 (90)
65 #define ANKLE_MOTOR_POS2 (-800000)
66 #define ANKLE_MOTOR_DEG2 (115)
67 
68 #endif /*ROBOT_PARAMS_H*/
robotJoints
Definition: RobotParams.h:21
RobotMode
Definition: RobotParams.h:30
const double Q_MIN_MAX[12]
Definition: RobotParams.h:44
#define deg2rad(deg)
Definition: RobotParams.h:18