Add apis for getting the measured velocities of the wheels
This commit is contained in:
parent
3906d7954d
commit
5bc4d85177
2 changed files with 25 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue