Skip to content

Commit fe8ae11

Browse files
committed
Format code
1 parent 0af4703 commit fe8ae11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎nav2_behaviors/include/nav2_behaviors/plugins/drive_on_heading.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ class DriveOnHeading : public TimedBehavior<ActionT>
150150

151151
// Check if we need to slow down to avoid overshooting
152152
bool forward = command_speed_ > 0.0 ? true : false;
153-
if ((forward && deceleration_limit_ > 0.0)) {
153+
if (forward && deceleration_limit_ > 0.0) {
154154
double max_vel_to_stop = std::sqrt(2.0 * deceleration_limit_ * remaining_distance);
155155
if (max_vel_to_stop < cmd_vel->twist.linear.x) {
156156
cmd_vel->twist.linear.x = max_vel_to_stop;
157157
}
158-
} else if ((!forward && acceleration_limit_ > 0.0)) {
158+
} else if (!forward && acceleration_limit_ > 0.0) {
159159
double max_vel_to_stop = -std::sqrt(2.0 * acceleration_limit_ * remaining_distance);
160160
if (max_vel_to_stop > cmd_vel->twist.linear.x) {
161161
cmd_vel->twist.linear.x = max_vel_to_stop;

0 commit comments

Comments
 (0)