finished commenting on the .cpp file and changed the statistics library name
Dependencies: QEI2 PID IMU6050Ver11 Watchdog VL53L1X_Filter ros_lib_kinetic
Dependents: Version1-3 Version1-5
Diff: wheelchair.h
- Revision:
- 37:e0e6d3fe06a2
- Parent:
- 35:5a2fed4c2e9f
diff -r 4131f0480f70 -r e0e6d3fe06a2 wheelchair.h --- a/wheelchair.h Tue Jul 09 21:19:19 2019 +0000 +++ b/wheelchair.h Tue Jul 09 23:36:58 2019 +0000 @@ -3,7 +3,7 @@ /************************************************************************* * Importing libraries into wheelchair.h * **************************************************************************/ -#include "chair_BNO055.h" +#include "IMUWheelchair.h" #include "PID.h" #include "QEI.h" #include "VL53L1X.h" @@ -41,11 +41,11 @@ /************************************************************************* *IMU definitions for turning wheelchair **************************************************************************/ -#define WHEELCHAIR_RADIUS 56 //distance from IMU to edge of wheelchair(cm) -#define MAX_ANGULAR_DECELERATION 60 //found through testing, max +#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 degree per sec -#define MIN_WALL_LENGTH 10 // minimum distance from wall to ToF (cm) + //stop while turning. In rads per sec +#define minWallLength 10 // minimum distance from wall to ToF (cm) /************************************************************************* * * * Wheelchair class * @@ -217,8 +217,10 @@ double vel; double test1, test2; bool forwardSafety; - bool sideSafety; //to check if can turn - 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,14 +240,12 @@ DigitalIn* e_button; //Pointer to e_button - chair_BNO055* 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 QEI* wheelS; // Pointer to encoder VL53L1X** ToF; // Arrays of pointers to ToF sensors - - };