Implement new controller
Dependencies: mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo
Fork of Orion_newPCB_test by
Configuration/config.h
- Committer:
- akashvibhute
- Date:
- 2016-01-18
- Revision:
- 2:761e3c932ce0
- Child:
- 4:315716ef8178
File content as of revision 2:761e3c932ce0:
/* * * config.h Virgo v3 PCB AV22032015 * */ #ifndef VirgoConfig_H #define VirgoConfig_H //** General Functions **************************************************************************** #define PC_BAUDRATE 921600 //------------------------------------------------------------------------------------------------- //** Function exectution rates ******************************************************************** #define Hearbeat_RateHz 10 //hearbeat loop run rate in Hz #define imu_UpdateRateHz 200 // imu update rate in Hz #define motorControl_UpdateRateHz 100 // motorControl update rate in Hz #define odometry_UpdateRateHz 125 //odometry update rate in Hz #define PrintLoop_RateHz 10 //print loop run rate in Hz #define PurePursuit_UpdateRateHz 20//Pure pursuit update run rate in Hz #define WaypointCmd_UpdateRateHz 10 //waypoint commander run rate in Hz #define CommLoop_UpdateRateHz 100 //Communications loop run rate in Hz #define nRfDefault_uploadRateMS 200 //default upload rate in ms for nRF wireless comm #define camera_OnRateMinutes 15 //default camera switch on frequency in minutes #define camera_CaptureTimeS 30 //default camera capture time in seconds //------------------------------------------------------------------------------------------------- //** IMU MPU9150 ********************************************************************************** #define IMU_FIFO_RATE_DIVIDER 0x01 // FIFO rate = 200Hz / (1 + this value), range 0x00 to 0x09. Here, 0x01 implies 100Hz. #define IMU_SAMPLE_RATE_DIVIDER 1 // Sample rate = 1kHz / (1 + this value), Here, 1 implies 500Hz. #define MPU6050_GYRO_FS MPU6050_GYRO_FS_2000 // measuring range of gyroscope (±n deg/s) #define MPU6050_ACCEL_FS MPU6050_ACCEL_FS_2 // measuring range of acceleration sensor (±n g) #define MPU6050_StabilizationReadings 10 //number of non deviating data points to determine if imu has stabilized #define GyroV_MWindowSize 25 //------------------------------------------------------------------------------------------------- //** Motor Control ******************************************************************************** #define motor_LimitRPM_min -100.0 #define motor_LimitRPM_max 300.0 #define motor_Acc_limit 200.0 #define PIDFf_kP 0.500 #define PIDFf_kI 0.900 #define PIDFf_kD 0.010 #define PIDFf_kFf 1.000 #define PIDFf_TermsLimit_min -0.3 #define PIDFf_TermsLimit_max 0.9 #define control_SummLimit_min -0.5 #define control_SummLimit_max 1.0 #define pid_MWindowSize 10 //------------------------------------------------------------------------------------------------- //** Encoder ************************************************************************************** #define encoder_resolution 104 #define encoder_MWindowSize 12 //------------------------------------------------------------------------------------------------- //** Localization ********************************************************************************* #define wheel_dia 10 //wheel dia in mm //------------------------------------------------------------------------------------------------- //** Drivetrain commander ************************************************************************* #define track_width 25 //track width in mm #define driveTrain_minV 100 //min velocity of individual drive in mm/s #define driveTrain_maxV 200 //max velocity of individual drive in mm/s //------------------------------------------------------------------------------------------------- //** Communications ******************************************************************************* #define virgo3_robot_address 01 //address of this robot node #define virgo3_network_channel 90 //communications channel number //------------------------------------------------------------------------------------------------- //** HansonController ***************************************************************************** #define wheelV_MWindowSize 25 //wheel velocity moving window filter size, customized for Pitch controller //------------------------------------------------------------------------------------------------- #endif /* VirgoConfig_H */