From aa65db737ab04629dee99e4c9682f6864dc5cf65 Mon Sep 17 00:00:00 2001 From: Akshat Pandya Date: Thu, 23 Dec 2021 20:57:45 -0800 Subject: [PATCH] Rollback wrong changes in DiffDriveOdometry.cc fix #301 Signed-off-by: Akshat Pandya --- src/DiffDriveOdometry.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/DiffDriveOdometry.cc b/src/DiffDriveOdometry.cc index 6814b3900..68441dc84 100644 --- a/src/DiffDriveOdometry.cc +++ b/src/DiffDriveOdometry.cc @@ -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; @@ -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; @@ -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; @@ -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) {