Added more code for side and angled sensor
Dependencies: QEI2 PID Watchdog VL53L1X_Filter BNOWrapper ros_lib_kinetic
Diff: wheelchair.h
- Revision:
- 41:1a687bcf4b0a
- Parent:
- 37:e0e6d3fe06a2
- Child:
- 42:62c49ad06707
--- a/wheelchair.h Thu Jul 11 18:38:03 2019 +0000 +++ b/wheelchair.h Thu Jul 11 20:58:26 2019 +0000 @@ -41,11 +41,11 @@ /************************************************************************* *IMU definitions for turning wheelchair **************************************************************************/ -#define WheelchairRadius 80 //distance from IMU to edge of wheelchair(cm) -#define maxAngularDeceleration 1.04 //found through testing, max - //acceleration at which chair can - //stop while turning. In rads per sec -#define minWallLength 10 // minimum distance from wall to ToF (cm) +#define WheelchairRadius 80 //distance from IMU to edge of wheelchair(cm) +#define maxAngularDeceleration 1.04 //found through testing, max + //acceleration at which chair can + //stop while turning. In rads per sec +#define minWallLength 10 // minimum distance from wall to ToF (cm) /************************************************************************* * * * Wheelchair class * @@ -217,10 +217,10 @@ double vel; double test1, test2; bool forwardSafety; - bool backwardSafety;//Check if can move backward - bool leftSafety; //to check if can turn left - bool rightSafety; //to check if can turn right - double curr_yaw, curr_velS;// Variable that contains current relative angle + bool backwardSafety; //Check if can move backward + bool leftSafety; //to check if can turn left + bool rightSafety; //to check if can turn right + double curr_yaw, curr_velS; // Variable that contains current relative angle private: /************************************************************************ @@ -238,9 +238,9 @@ PwmOut* on; PwmOut* off; - DigitalIn* e_button; //Pointer to e_button + DigitalIn* e_button; // Pointer to e_button - IMUWheelchair* imu; // Pointer to IMU + IMUWheelchair* imu; // Pointer to IMU Serial* out; // Pointer to Serial Monitor Timer* ti; // Pointer to the timer QEI* wheel; // Pointer to encoder