Skip to content

Commit

Permalink
Fixed turning error in ackermann steering (gazebosim#2342)
Browse files Browse the repository at this point in the history
This is a fix to the error seen in Ackermann Steering's <steering_only> mode. The steps to reproduce this error are described in issue gazebosim#2314.

Signed-off-by: Saurabh Kamat <[email protected]>
Signed-off-by: Gaurav Kumar <[email protected]>
  • Loading branch information
sauk2 authored and GauravKumar9920 committed Mar 30, 2024
1 parent 8ca57b4 commit 55cd8a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/systems/ackermann_steering/AckermannSteering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -968,11 +968,11 @@ void AckermannSteeringPrivate::UpdateAngle(

double leftSteeringJointAngle =
atan((2.0 * this->wheelBase * sin(ang)) / \
((2.0 * this->wheelBase * cos(ang)) + \
((2.0 * this->wheelBase * cos(ang)) - \
(1.0 * this->wheelSeparation * sin(ang))));
double rightSteeringJointAngle =
atan((2.0 * this->wheelBase * sin(ang)) / \
((2.0 * this->wheelBase * cos(ang)) - \
((2.0 * this->wheelBase * cos(ang)) + \
(1.0 * this->wheelSeparation * sin(ang))));

auto leftSteeringPos = _ecm.Component<components::JointPosition>(
Expand Down

0 comments on commit 55cd8a6

Please sign in to comment.