Skip to content

Commit

Permalink
Fix correct usage of angular velocity in update_odometry() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferry Schoenmakers committed May 6, 2024
1 parent 2a59f60 commit 2e939bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions steering_controllers_library/src/steering_odometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool SteeringOdometry::update_odometry(
const double linear_velocity, const double angular, const double dt)
{
/// Integrate odometry:
SteeringOdometry::integrate_exact(linear_velocity * dt, angular);
SteeringOdometry::integrate_exact(linear_velocity * dt, angular * dt);

/// We cannot estimate the speed with very small time intervals:
if (dt < 0.0001)
Expand All @@ -62,7 +62,7 @@ bool SteeringOdometry::update_odometry(

/// Estimate speeds using a rolling mean to filter them out:
linear_acc_.accumulate(linear_velocity);
angular_acc_.accumulate(angular / dt);
angular_acc_.accumulate(angular);

linear_ = linear_acc_.getRollingMean();
angular_ = angular_acc_.getRollingMean();
Expand Down

0 comments on commit 2e939bd

Please sign in to comment.