Skip to content
Prev Previous commit
Replace throwing with silent sign correction
Signed-off-by: RBT22 <rozgonyibalint@gmail.com>
  • Loading branch information
RBT22 committed Jan 28, 2025
commit 80ffedf18297acc8f8d57c11a04b7adf1b50ea0a
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ class DriveOnHeading : public TimedBehavior<ActionT>
RCLCPP_ERROR(this->logger_,
"DriveOnHeading: acceleration_limit and deceleration_limit must be "
"positive and negative respectively");
throw std::runtime_error{"Invalid parameter: acceleration_limit or deceleration_limit"};
acceleration_limit_ = std::abs(acceleration_limit_);
deceleration_limit_ = -std::abs(deceleration_limit_);
}
}

Expand Down
Loading