Add apis for getting the measured velocities of the wheels

This commit is contained in:
Erik Schembor 2017-12-13 22:04:22 -05:00
parent 3906d7954d
commit 5bc4d85177
2 changed files with 25 additions and 0 deletions

View file

@ -170,6 +170,9 @@ namespace create {
deltaYaw = wheelDistDiff / model.getAxleLength();
}
measuredLeftVel = leftWheelDist / dt;
measuredRightVel = rightWheelDist / dt;
// Moving straight
if (fabs(wheelDistDiff) < util::EPS) {
deltaX = deltaDist * cos(pose.yaw);
@ -975,6 +978,14 @@ namespace create {
return totalRightDist;
}
float Create::getMeasuredLeftWheelVel() const {
return measuredLeftVel;
}
float Create::getMeasuredRightWheelVel() const {
return measuredRightVel;
}
float Create::getRequestedLeftWheelVel() const {
return requestedLeftVel;
}