Skip to content

Commit

Permalink
Signed-off-by: Berkay Karaman <brkay54@gmail.com>
Browse files Browse the repository at this point in the history
  • Loading branch information
brkay54 committed Aug 22, 2023
1 parent 32c45f9 commit 80b9f4c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,9 @@ PidLongitudinalController::ControlData PidLongitudinalController::getControlData
target_interpolated_point.first);
}

std::cout << control_data.state_after_delay.running_distance << " " << control_data.nearest_idx
<< " " << control_data.target_idx << std::endl;
// std::cout << control_data.state_after_delay.running_distance << " " <<
// control_data.nearest_idx
// << " " << control_data.target_idx << std::endl;
// calculate the predicted velocity in the target point
m_debug_values.setValues(DebugValues::TYPE::PREDICTED_VEL, control_data.state_after_delay.vel);
m_debug_values.setValues(
Expand Down Expand Up @@ -537,9 +538,8 @@ void PidLongitudinalController::updateControlState(const ControlData & control_d
m_last_running_time = std::make_shared<rclcpp::Time>(node_->now());
}
const bool stopped_condition =
m_last_running_time
? (node_->now() - *m_last_running_time).seconds() > p.stopped_state_entry_duration_time
: false;
m_last_running_time &&
(node_->now() - *m_last_running_time).seconds() > p.stopped_state_entry_duration_time;

static constexpr double vel_epsilon =
1e-3; // NOTE: the same velocity threshold as motion_utils::searchZeroVelocity
Expand Down

0 comments on commit 80b9f4c

Please sign in to comment.