Code for the COVR project DROPSAW project test rig (previously used for the Heros testing).
Dependencies: SPTE_10Bar_5V mbed AS5048 SDFileSystem MODSERIAL LCM101_DROPSAW LinearActuator
constants.cpp@2:84d479fe9b5e, 2018-06-05 (annotated)
- Committer:
- Technical_Muffin
- Date:
- Tue Jun 05 08:49:21 2018 +0000
- Revision:
- 2:84d479fe9b5e
- Parent:
- 0:3855d4588f76
- Child:
- 4:1cdce6c6c94e
Added torque calculation to the main file of the code. The constant calibration values were also changed to correctly display the desired values.
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 |
Technical_Muffin | 2:84d479fe9b5e | 6 | const float kLcm101Offset = -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 |
Technical_Muffin | 2:84d479fe9b5e | 9 | const float kLcm101Factor = 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 |
Technical_Muffin | 2:84d479fe9b5e | 12 | |
megrootens | 0:3855d4588f76 | 13 | // AS5048 abs angle sensor chain |
megrootens | 0:3855d4588f76 | 14 | const int kNumJoints = 4; |
megrootens | 0:3855d4588f76 | 15 | |
megrootens | 0:3855d4588f76 | 16 | const char *kJointNames[] = {"Toes","Ankle","Knee","Hip"}; |
megrootens | 0:3855d4588f76 | 17 | const float kOffsetsDegrees[] = {83.2f,6.3f,170.7f,6.5f}; |
megrootens | 0:3855d4588f76 | 18 | const bool kDirections[] = {false,true,false,true}; |
megrootens | 0:3855d4588f76 | 19 | } |
megrootens | 0:3855d4588f76 | 20 | |
megrootens | 0:3855d4588f76 | 21 | namespace timing { |
megrootens | 0:3855d4588f76 | 22 | const int kTimeControlUs = 1000; // 1000 Hz control loop |
megrootens | 0:3855d4588f76 | 23 | const int kTimeLogDataUs = 20000; // 50 Hz data logging |
megrootens | 0:3855d4588f76 | 24 | const int kTimeSerialPrintUs = 500000; // 2 Hz serial print |
megrootens | 0:3855d4588f76 | 25 | |
megrootens | 0:3855d4588f76 | 26 | const int kSerialBaudrate = 115200; |
megrootens | 0:3855d4588f76 | 27 | } |