
Basic Mid-Level control for the rebuilt MorphGI control unit, using PWM to communicate with the low level controllers.
Dependencies: ros_lib_kinetic
MLSettings.h@42:5a5ad23a4bb1, 2021-06-24 (annotated)
- Committer:
- dofydoink
- Date:
- Thu Jun 24 20:34:47 2021 +0000
- Revision:
- 42:5a5ad23a4bb1
- Parent:
- 41:0e3898b29230
first
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dofydoink | 12:595ed862e52f | 1 | // MLSettings.h |
dofydoink | 12:595ed862e52f | 2 | |
dofydoink | 12:595ed862e52f | 3 | #ifndef MLSETTINGS_H |
dofydoink | 12:595ed862e52f | 4 | #define MLSETTINGS_H |
dofydoink | 12:595ed862e52f | 5 | |
dofydoink | 12:595ed862e52f | 6 | // GENERAL SETTINGS |
dofydoink | 42:5a5ad23a4bb1 | 7 | const unsigned short int N_CHANNELS = 3; // Number of channels to control |
dofydoink | 12:595ed862e52f | 8 | // 1-3: front segment; 4-6: rear segment; 7-8: mid segment |
WD40andTape | 28:8e0c502c1a50 | 9 | const int BAUD_RATE = 115200; //9600; //115200 |
dofydoink | 42:5a5ad23a4bb1 | 10 | const float PI = 3.14159265359; |
dofydoink | 12:595ed862e52f | 11 | |
dofydoink | 12:595ed862e52f | 12 | // HL COMMUNICATION SETTINGS |
dofydoink | 12:595ed862e52f | 13 | const bool IS_DHCP = false; |
WD40andTape | 31:08cb04eb75fc | 14 | const unsigned short int HL_COMMS_FREQ_HZ = 200; // Frequency at which communications can happen with HL, if messages are waiting |
WD40andTape | 24:bc852aa89e7a | 15 | |
WD40andTape | 24:bc852aa89e7a | 16 | // REAL TIME FREQUENCIES |
dofydoink | 42:5a5ad23a4bb1 | 17 | const short int SENSOR_FEEDBACK_HZ = 5; // Frequency at which sensor messages are queued / published to HL |
dofydoink | 42:5a5ad23a4bb1 | 18 | const float LL_DEMANDS_FREQ_HZ = 5; |
dofydoink | 42:5a5ad23a4bb1 | 19 | const unsigned int LOW_LEVEL_SPI_FREQUENCY = 1000000; |
dofydoink | 42:5a5ad23a4bb1 | 20 | const double HHC_READ_FREQ_HZ = 50; |
dofydoink | 12:595ed862e52f | 21 | |
dofydoink | 41:0e3898b29230 | 22 | const float MAX_PRESSURE_LIMIT = 12.0; |
WD40andTape | 26:7c59002c9cd7 | 23 | |
dofydoink | 12:595ed862e52f | 24 | // PATH GENERATION SETTINGS |
WD40andTape | 27:6853ee8ffefd | 25 | const float MAX_ACTUATOR_LIMIT_MM = 40.0; |
WD40andTape | 26:7c59002c9cd7 | 26 | const float MAX_ACTUATOR_LENGTH_MM = 52.2; |
dofydoink | 12:595ed862e52f | 27 | const float MAX_SPEED_MMPS = 24.3457; |
dofydoink | 42:5a5ad23a4bb1 | 28 | const float MAX_DRIVE_SEGMENT_POSITION = 8.0;//the maximum pressure attainable by LL |
dofydoink | 42:5a5ad23a4bb1 | 29 | const double MAX_EXTENSION_PRESSURE = 6.0; //the desired maximum operating pressure. |
dofydoink | 42:5a5ad23a4bb1 | 30 | const double MAX_DRIVE_SEGMENT_SPEED = 4.0; |
dofydoink | 42:5a5ad23a4bb1 | 31 | const double SAFE_CONTRACT_SPEED = 2.0; |
dofydoink | 42:5a5ad23a4bb1 | 32 | const double MAX_STEER_SPEED_RADpS = 1.3; //1.212 rad/s was calculated |
dofydoink | 42:5a5ad23a4bb1 | 33 | const double SAFE_SPEED_MMpS = 8.0; |
dofydoink | 42:5a5ad23a4bb1 | 34 | const double ANCHOR_POSITION = 25.0; |
dofydoink | 42:5a5ad23a4bb1 | 35 | const double HOME_DRIVE_POSITION = 0.0; |
dofydoink | 42:5a5ad23a4bb1 | 36 | |
dofydoink | 42:5a5ad23a4bb1 | 37 | // KINEMATIC LIMTS & CONSTANTS |
dofydoink | 42:5a5ad23a4bb1 | 38 | const float MAX_THETA_RAD = 3.665191429; //210 degrees |
dofydoink | 42:5a5ad23a4bb1 | 39 | const float ACTUATOR_OFFSET = 6.0; //mm |
dofydoink | 42:5a5ad23a4bb1 | 40 | const double ACT_CONV = 6.055836122; // mm/mL convert injected volume in [mL] to actuator distance in [mm] |
dofydoink | 12:595ed862e52f | 41 | |
dofydoink | 12:595ed862e52f | 42 | #endif |