switch units
rad to deg cm per s to cm per loop
This commit is contained in:
parent
aba495d3f1
commit
511d5fc281
2 changed files with 1 additions and 3 deletions
|
|
@ -142,10 +142,8 @@ Pose Chassis::CalcOdomFromWheelMotion(void)
|
|||
Pose delta;
|
||||
|
||||
float leftDelta = (float) leftMotor.speed
|
||||
* (float) CONTROL_LOOP_PERIOD_MS / 1000.0
|
||||
/ LEFT_TICKS_PER_CM;
|
||||
float rightDelta = (float) rightMotor.speed
|
||||
* (float) CONTROL_LOOP_PERIOD_MS / 1000.0
|
||||
/ RIGHT_TICKS_PER_CM;
|
||||
|
||||
float distance = (leftDelta + rightDelta) / 2.0;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ void Robot::UpdatePose(const Pose& delta)
|
|||
#ifdef __NAV_DEBUG__
|
||||
TeleplotPrint("x", currPose.x);
|
||||
TeleplotPrint("y", currPose.y);
|
||||
TeleplotPrint("theta", currPose.theta);
|
||||
TeleplotPrint("theta", currPose.theta * 180.0 / PI);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue