Basic Mid-Level control for the rebuilt MorphGI control unit, using PWM to communicate with the low level controllers.

Dependencies:   ros_lib_kinetic

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MLSettings.h Source File

MLSettings.h

00001 // MLSettings.h
00002 
00003 #ifndef MLSETTINGS_H
00004 #define MLSETTINGS_H
00005 
00006 // GENERAL SETTINGS
00007 const unsigned short int N_CHANNELS = 3; // Number of channels to control
00008 // 1-3: front segment; 4-6: rear segment; 7-8: mid segment
00009 const int BAUD_RATE = 115200; //9600; //115200
00010 const float PI = 3.14159265359;
00011 
00012 // HL COMMUNICATION SETTINGS
00013 const bool IS_DHCP = false;
00014 const unsigned short int HL_COMMS_FREQ_HZ = 200; // Frequency at which communications can happen with HL, if messages are waiting
00015 
00016 // REAL TIME FREQUENCIES
00017 const short int SENSOR_FEEDBACK_HZ = 5; // Frequency at which sensor messages are queued / published to HL
00018 const float LL_DEMANDS_FREQ_HZ = 5;
00019 const unsigned int LOW_LEVEL_SPI_FREQUENCY = 1000000;
00020 const double HHC_READ_FREQ_HZ = 50;
00021 
00022 const float MAX_PRESSURE_LIMIT = 12.0;
00023 
00024 // PATH GENERATION SETTINGS
00025 const float MAX_ACTUATOR_LIMIT_MM = 40.0;
00026 const float MAX_ACTUATOR_LENGTH_MM = 52.2;
00027 const float MAX_SPEED_MMPS = 24.3457;
00028 const float MAX_DRIVE_SEGMENT_POSITION = 8.0;//the maximum pressure attainable by LL
00029 const double MAX_EXTENSION_PRESSURE = 6.0; //the desired maximum operating pressure.
00030 const double MAX_DRIVE_SEGMENT_SPEED = 4.0;
00031 const double SAFE_CONTRACT_SPEED = 2.0;
00032 const double MAX_STEER_SPEED_RADpS = 1.3; //1.212 rad/s was calculated
00033 const double SAFE_SPEED_MMpS = 8.0;
00034 const double ANCHOR_POSITION = 25.0;
00035 const double HOME_DRIVE_POSITION = 0.0;
00036 
00037 // KINEMATIC LIMTS & CONSTANTS
00038 const float MAX_THETA_RAD = 3.665191429; //210 degrees
00039 const float ACTUATOR_OFFSET = 6.0; //mm
00040 const double ACT_CONV = 6.055836122; // mm/mL convert injected volume in [mL] to actuator distance in [mm]
00041 
00042 #endif