Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sai Kishor Kothakota <[email protected]>
  • Loading branch information
christophfroehlich and saikishor authored Dec 6, 2024
1 parent 58b114c commit 89b4db3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ class SpeedLimiter

/**
* \brief Constructor
* \param [in] has_velocity_limits if true, applies velocity limits
* \param [in] has_acceleration_limits if true, applies acceleration limits
* \param [in] has_jerk_limits if true, applies jerk limits
* \param [in] min_velocity Minimum velocity [m/s], usually <= 0
* \param [in] max_velocity Maximum velocity [m/s], usually >= 0
* \param [in] max_acceleration_reverse Maximum acceleration in reverse direction [m/s^2], usually
Expand Down
12 changes: 6 additions & 6 deletions diff_drive_controller/src/diff_drive_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@ controller_interface::CallbackReturn DiffDriveController::on_configure(
{
RCLCPP_WARN(
logger,
"[deprecated] has_velocity_limits parameter is deprecated. Set the respective limits to NAN");
"[deprecated] has_velocity_limits parameter is deprecated, instead set the respective limits to NAN");
params_.linear.x.min_velocity = params_.linear.x.max_velocity =
std::numeric_limits<double>::quiet_NaN();
}
if (!params_.linear.x.has_acceleration_limits)
{
RCLCPP_WARN(
logger,
"[deprecated] has_acceleration_limits parameter is deprecated. Set the respective limits to "
"[deprecated] has_acceleration_limits parameter is deprecated, instead set the respective limits to "
"NAN");
params_.linear.x.max_deceleration = params_.linear.x.max_acceleration =
params_.linear.x.max_deceleration_reverse = params_.linear.x.max_acceleration_reverse =
Expand All @@ -328,23 +328,23 @@ controller_interface::CallbackReturn DiffDriveController::on_configure(
{
RCLCPP_WARN(
logger,
"[deprecated] has_jerk_limits parameter is deprecated. Set the respective limits to NAN");
"[deprecated] has_jerk_limits parameter is deprecated, instead set the respective limits to NAN");
params_.linear.x.min_jerk = params_.linear.x.max_jerk =
std::numeric_limits<double>::quiet_NaN();
}
if (!params_.angular.z.has_velocity_limits)
{
RCLCPP_WARN(
logger,
"[deprecated] has_velocity_limits parameter is deprecated. Set the respective limits to NAN");
"[deprecated] has_velocity_limits parameter is deprecated, instead set the respective limits to NAN");
params_.angular.z.min_velocity = params_.angular.z.max_velocity =
std::numeric_limits<double>::quiet_NaN();
}
if (!params_.angular.z.has_acceleration_limits)
{
RCLCPP_WARN(
logger,
"[deprecated] has_acceleration_limits parameter is deprecated. Set the respective limits to "
"[deprecated] has_acceleration_limits parameter is deprecated, instead set the respective limits to "
"NAN");
params_.angular.z.max_deceleration = params_.angular.z.max_acceleration =
params_.angular.z.max_deceleration_reverse = params_.angular.z.max_acceleration_reverse =
Expand All @@ -354,7 +354,7 @@ controller_interface::CallbackReturn DiffDriveController::on_configure(
{
RCLCPP_WARN(
logger,
"[deprecated] has_jerk_limits parameter is deprecated. Set the respective limits to NAN");
"[deprecated] has_jerk_limits parameter is deprecated, instead set the respective limits to NAN");
params_.angular.z.min_jerk = params_.angular.z.max_jerk =
std::numeric_limits<double>::quiet_NaN();
}
Expand Down

0 comments on commit 89b4db3

Please sign in to comment.