Skip to content

Commit

Permalink
Rollback wrong changes in DiffDriveOdometry.cc
Browse files Browse the repository at this point in the history
fix gazebosim#301

Signed-off-by: Akshat Pandya <[email protected]>
  • Loading branch information
akshatpandya committed Dec 24, 2021
1 parent ec25c90 commit aa65db7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/DiffDriveOdometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class ignition::math::DiffDriveOdometryPrivate
/// Runge-Kutta.
/// \param[in] _linear Linear velocity.
/// \param[in] _angular Angular velocity.
public: void IntegrateRungeKutta2(const double _linear,
const double _angular);
public: void IntegrateRungeKutta2(double _linear,
double _angular);

/// \brief Integrates the velocities (linear and angular) using exact
/// method.
/// \param[in] _linear Linear velocity.
/// \param[in] _angular Angular velocity.
public: void IntegrateExact(const double _linear, const double _angular);
public: void IntegrateExact(double _linear, double _angular);

/// \brief Current timestamp.
public: clock::time_point lastUpdateTime;
Expand Down Expand Up @@ -166,8 +166,8 @@ bool DiffDriveOdometry::Update(const Angle &_leftPos, const Angle &_rightPos,
}

//////////////////////////////////////////////////
void DiffDriveOdometry::SetWheelParams(const double _wheelSeparation,
const double _leftWheelRadius, const double _rightWheelRadius)
void DiffDriveOdometry::SetWheelParams(double _wheelSeparation,
double _leftWheelRadius, double _rightWheelRadius)
{
this->dataPtr->wheelSeparation = _wheelSeparation;
this->dataPtr->leftWheelRadius = _leftWheelRadius;
Expand Down Expand Up @@ -213,7 +213,7 @@ const Angle &DiffDriveOdometry::AngularVelocity() const

//////////////////////////////////////////////////
void DiffDriveOdometryPrivate::IntegrateRungeKutta2(
const double _linear, const double _angular)
double _linear, double _angular)
{
const double direction = *this->heading + _angular * 0.5;

Expand All @@ -224,8 +224,8 @@ void DiffDriveOdometryPrivate::IntegrateRungeKutta2(
}

//////////////////////////////////////////////////
void DiffDriveOdometryPrivate::IntegrateExact(const double _linear,
const double _angular)
void DiffDriveOdometryPrivate::IntegrateExact(double _linear,
double _angular)
{
if (std::fabs(_angular) < 1e-6)
{
Expand Down

0 comments on commit aa65db7

Please sign in to comment.