File tree 1 file changed +5
-5
lines changed
control/pid_longitudinal_controller/src
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -463,8 +463,9 @@ PidLongitudinalController::ControlData PidLongitudinalController::getControlData
463
463
target_interpolated_point.first );
464
464
}
465
465
466
- std::cout << control_data.state_after_delay .running_distance << " " << control_data.nearest_idx
467
- << " " << control_data.target_idx << std::endl;
466
+ // std::cout << control_data.state_after_delay.running_distance << " " <<
467
+ // control_data.nearest_idx
468
+ // << " " << control_data.target_idx << std::endl;
468
469
// calculate the predicted velocity in the target point
469
470
m_debug_values.setValues (DebugValues::TYPE::PREDICTED_VEL, control_data.state_after_delay .vel );
470
471
m_debug_values.setValues (
@@ -537,9 +538,8 @@ void PidLongitudinalController::updateControlState(const ControlData & control_d
537
538
m_last_running_time = std::make_shared<rclcpp::Time>(node_->now ());
538
539
}
539
540
const bool stopped_condition =
540
- m_last_running_time
541
- ? (node_->now () - *m_last_running_time).seconds () > p.stopped_state_entry_duration_time
542
- : false ;
541
+ m_last_running_time &&
542
+ (node_->now () - *m_last_running_time).seconds () > p.stopped_state_entry_duration_time ;
543
543
544
544
static constexpr double vel_epsilon =
545
545
1e-3 ; // NOTE: the same velocity threshold as motion_utils::searchZeroVelocity
You can’t perform that action at this time.
0 commit comments