Skip to content

Commit

Permalink
Make sure steering joints exist before updating velocity / odometry i…
Browse files Browse the repository at this point in the history
…n AckermannSteering plugin (#2521)

Signed-off-by: Ian Chen <ichen@openrobotics.org>
  • Loading branch information
iche033 authored Aug 12, 2024
1 parent 523b01b commit c48fa58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/systems/ackermann_steering/AckermannSteering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,11 @@ void AckermannSteering::PostUpdate(const UpdateInfo &_info,
// Nothing left to do if paused.
if (_info.paused)
return;

if (this->dataPtr->leftSteeringJoints.empty() ||
this->dataPtr->rightSteeringJoints.empty())
return;

if (this->dataPtr->steeringOnly)
{
this->dataPtr->UpdateAngle(_info, _ecm);
Expand Down

0 comments on commit c48fa58

Please sign in to comment.