Skip to content

Commit

Permalink
Fixed turning error in ackermann steering (#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 #2314.

Signed-off-by: Saurabh Kamat <[email protected]>
  • Loading branch information
sauk2 authored Mar 27, 2024
1 parent 5944188 commit 1d5114b
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 1d5114b

Please sign in to comment.