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
05_TrajectoryTracking/purePursuit.h@2:761e3c932ce0, 2016-01-18 (annotated)
- Committer:
- akashvibhute
- Date:
- Mon Jan 18 06:00:43 2016 +0000
- Revision:
- 2:761e3c932ce0
guess this is the initial commit :P
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
akashvibhute | 2:761e3c932ce0 | 1 | #ifndef purePursuit_H |
akashvibhute | 2:761e3c932ce0 | 2 | #define purePursuit_H |
akashvibhute | 2:761e3c932ce0 | 3 | |
akashvibhute | 2:761e3c932ce0 | 4 | #include "mbed.h" |
akashvibhute | 2:761e3c932ce0 | 5 | #include "generalFunctions.h" |
akashvibhute | 2:761e3c932ce0 | 6 | #include "config.h" |
akashvibhute | 2:761e3c932ce0 | 7 | |
akashvibhute | 2:761e3c932ce0 | 8 | class purePursuit |
akashvibhute | 2:761e3c932ce0 | 9 | { |
akashvibhute | 2:761e3c932ce0 | 10 | public: |
akashvibhute | 2:761e3c932ce0 | 11 | |
akashvibhute | 2:761e3c932ce0 | 12 | purePursuit(); |
akashvibhute | 2:761e3c932ce0 | 13 | |
akashvibhute | 2:761e3c932ce0 | 14 | void GenVW(float* purePursuit_velocity, float* purePursuit_omega, |
akashvibhute | 2:761e3c932ce0 | 15 | float target_waypoint[2], float target_velocity, |
akashvibhute | 2:761e3c932ce0 | 16 | float current_position[2], float current_heading); |
akashvibhute | 2:761e3c932ce0 | 17 | |
akashvibhute | 2:761e3c932ce0 | 18 | private: |
akashvibhute | 2:761e3c932ce0 | 19 | static float const ld_min = 60.0; //min purepursuit lookahead distance |
akashvibhute | 2:761e3c932ce0 | 20 | static float const ld_max = 600.0; //max purepursuit lookahead distance |
akashvibhute | 2:761e3c932ce0 | 21 | static float const trackingLimit = 60.0; //purepursuit will track only until the target distance is greater than this limit |
akashvibhute | 2:761e3c932ce0 | 22 | |
akashvibhute | 2:761e3c932ce0 | 23 | static float const drive_minV = driveTrain_minV; |
akashvibhute | 2:761e3c932ce0 | 24 | static float const drive_maxV = driveTrain_maxV; |
akashvibhute | 2:761e3c932ce0 | 25 | |
akashvibhute | 2:761e3c932ce0 | 26 | static float const purePursuit_omega_limit = DEG_TO_RAD(120); |
akashvibhute | 2:761e3c932ce0 | 27 | |
akashvibhute | 2:761e3c932ce0 | 28 | float robotFrame_targetPos[2]; |
akashvibhute | 2:761e3c932ce0 | 29 | float robotFrame_targetDistance; |
akashvibhute | 2:761e3c932ce0 | 30 | float purePursuit_ld; |
akashvibhute | 2:761e3c932ce0 | 31 | float purePursuit_r; |
akashvibhute | 2:761e3c932ce0 | 32 | float purePursuit_headingE; |
akashvibhute | 2:761e3c932ce0 | 33 | }; |
akashvibhute | 2:761e3c932ce0 | 34 | |
akashvibhute | 2:761e3c932ce0 | 35 | |
akashvibhute | 2:761e3c932ce0 | 36 | #endif |