![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
sra-romi
Dependencies: BufferedSerial Matrix
Diff: Robot.h
- Revision:
- 4:1defb279922a
- Parent:
- 1:dc87724abce8
diff -r 0a718d139ed1 -r 1defb279922a Robot.h --- a/Robot.h Wed Apr 24 16:00:07 2019 +0000 +++ b/Robot.h Tue May 11 18:10:22 2021 +0000 @@ -3,10 +3,23 @@ #define ROBOT_H_ #include "mbed.h" +#include <cstdint> + +extern const int16_t COUNTS_PER_ROTATION; +extern const int16_t WHEEL_DIAMETER; +extern const int16_t WHEEL_DISTANCE; +extern const float MAX_LIN_VEL; +extern const float MIN_LIN_VEL; +extern const float MIN_SET_SPEEDS; +extern const float MAX_SET_SPEEDS; extern int16_t countsLeft; extern int16_t countsRight; +extern float poseX; +extern float poseY; +extern float poseTheta; + /** \brief Sets the speed for both motors. * * \param leftSpeed A number from -300 to 300 representing the speed and @@ -46,4 +59,10 @@ * not have to worry about the count overflowing. */ void getCountsAndReset(); +void updatePose(); + +void robotVel2wheelVel(float v, float w, float *wheelSpeeds); + +float mapSpeeds(float value); + #endif /* ROBOT_H_ */ \ No newline at end of file