Version 3 is with update to the test rig with a linear actuator
Dependencies: SPTE_10Bar_5V mbed AS5048 SDFileSystem MODSERIAL PinDetect LCM101 LinearActuator
constants.cpp@4:1cdce6c6c94e, 2018-10-12 (annotated)
- Committer:
- cnckiwi31
- Date:
- Fri Oct 12 12:12:55 2018 +0000
- Revision:
- 4:1cdce6c6c94e
- Parent:
- 2:84d479fe9b5e
- Child:
- 5:63063a9fa51c
HeRoS: read out and log joint angles and force sensor data from the leg test bench.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
megrootens | 0:3855d4588f76 | 1 | #include "constants.h" |
megrootens | 0:3855d4588f76 | 2 | |
megrootens | 0:3855d4588f76 | 3 | namespace sensors { |
megrootens | 0:3855d4588f76 | 4 | |
megrootens | 0:3855d4588f76 | 5 | // LCM101-100kgf force sensor |
cnckiwi31 | 4:1cdce6c6c94e | 6 | const float kLcm101Offset = 1.99;//-1.52; |
Technical_Muffin | 2:84d479fe9b5e | 7 | //This is currently the offset for the S610 sensor -5.41; |
Technical_Muffin | 2:84d479fe9b5e | 8 | //Offset for LCM101 sensor = -1.52 |
cnckiwi31 | 4:1cdce6c6c94e | 9 | const float kLcm101Factor = 969.2;//970.55; |
Technical_Muffin | 2:84d479fe9b5e | 10 | //This is currently the factor for the S610 sensor 977.35; |
Technical_Muffin | 2:84d479fe9b5e | 11 | //Factor for LCM101 sensor is 970.55 |
cnckiwi31 | 4:1cdce6c6c94e | 12 | |
cnckiwi31 | 4:1cdce6c6c94e | 13 | // Pressure sensor slope and offset values for a gauge pressure reading in bar |
cnckiwi31 | 4:1cdce6c6c94e | 14 | const float kSPTE0Offset = -2.47; |
cnckiwi31 | 4:1cdce6c6c94e | 15 | |
cnckiwi31 | 4:1cdce6c6c94e | 16 | const float kSPTE0Factor = 12.5; // |
cnckiwi31 | 4:1cdce6c6c94e | 17 | |
cnckiwi31 | 4:1cdce6c6c94e | 18 | const float kSPTE1Offset = -2.47; |
cnckiwi31 | 4:1cdce6c6c94e | 19 | |
cnckiwi31 | 4:1cdce6c6c94e | 20 | const float kSPTE1Factor = 12.5; // |
Technical_Muffin | 2:84d479fe9b5e | 21 | |
megrootens | 0:3855d4588f76 | 22 | // AS5048 abs angle sensor chain |
megrootens | 0:3855d4588f76 | 23 | const int kNumJoints = 4; |
megrootens | 0:3855d4588f76 | 24 | |
megrootens | 0:3855d4588f76 | 25 | const char *kJointNames[] = {"Toes","Ankle","Knee","Hip"}; |
megrootens | 0:3855d4588f76 | 26 | const float kOffsetsDegrees[] = {83.2f,6.3f,170.7f,6.5f}; |
megrootens | 0:3855d4588f76 | 27 | const bool kDirections[] = {false,true,false,true}; |
megrootens | 0:3855d4588f76 | 28 | } |
megrootens | 0:3855d4588f76 | 29 | |
megrootens | 0:3855d4588f76 | 30 | namespace timing { |
cnckiwi31 | 4:1cdce6c6c94e | 31 | const int TimeControlHertz = 5000;// control loop sample rate |
cnckiwi31 | 4:1cdce6c6c94e | 32 | const int LogDataHertz = 500; //data log sample rate |
cnckiwi31 | 4:1cdce6c6c94e | 33 | const int kTimeControlUs = 1000000/TimeControlHertz; // 1000 Hz control loop |
cnckiwi31 | 4:1cdce6c6c94e | 34 | const int kTimeLogDataUs = 1000000/LogDataHertz; // 200 Hz data logging |
megrootens | 0:3855d4588f76 | 35 | const int kTimeSerialPrintUs = 500000; // 2 Hz serial print |
megrootens | 0:3855d4588f76 | 36 | |
megrootens | 0:3855d4588f76 | 37 | const int kSerialBaudrate = 115200; |
megrootens | 0:3855d4588f76 | 38 | } |