File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
nav2_behaviors/include/nav2_behaviors/plugins Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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;
You can’t perform that action at this time.
0 commit comments