Expose individual wheel distances and requested velocities. Fix wheel distance calculation for the Create 1.

This commit is contained in:
Ben Wolsieffer 2016-06-23 16:27:05 -04:00
parent 1df7861f24
commit d6f759d683
4 changed files with 64 additions and 7 deletions

View file

@ -73,8 +73,8 @@ namespace create {
uint32_t prevTicksLeft;
uint32_t prevTicksRight;
float prevLeftVel;
float prevRightVel;
float totalLeftDist;
float totalRightDist;
bool firstOnData;
util::timestamp_t prevOnDataTime;
@ -444,6 +444,22 @@ namespace create {
*/
bool isMovingForward() const;
/* Get the total distance (in meters) the left wheel has moved.
*/
float getLeftWheelDistance() const;
/* Get the total distance (in meters) the right wheel has moved.
*/
float getRightWheelDistance() const;
/* Get the requested velocity (in meters/sec) of the left wheel.
*/
float getRequestedLeftWheelVel() const;
/* Get the requested velocity (in meters/sec) of the right wheel.
*/
float getRequestedRightWheelVel() const;
/* Get the current charging state.
*/
create::ChargingState getChargingState() const;