Skip to content

Commit

Permalink
use parameter for velocity_treshold
Browse files Browse the repository at this point in the history
Signed-off-by: Takamasa Horibe <[email protected]>
  • Loading branch information
TakaHoribe committed Oct 11, 2023
1 parent 289dbd5 commit b6c9bb2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,9 @@ void NormalLaneChange::insertStopPoint(
const auto target_objects = getTargetObjects(status_.current_lanes, status_.target_lanes);
const bool is_in_terminal_section = lanelet::utils::isInLanelet(getEgoPose(), lanelets.back()) ||
distance_to_terminal < lane_change_buffer;
const double stationary_obj_velocity_threshold = 0.3;
const bool has_blocking_target_lane_obj = std::any_of(
target_objects.target_lane.begin(), target_objects.target_lane.end(), [&](const auto & o) {
if (o.initial_twist.twist.linear.x > stationary_obj_velocity_threshold) {
if (o.initial_twist.twist.linear.x > lane_change_parameters_->stop_velocity_threshold) {
return false;
}
const double distance_to_target_lane_obj = utils::getSignedDistance(
Expand All @@ -227,7 +226,8 @@ void NormalLaneChange::insertStopPoint(

for (const auto & object : target_objects.current_lane) {
// check if stationary
if (std::abs(object.initial_twist.twist.linear.x) > stationary_obj_velocity_threshold) {
const auto obj_v = std::abs(object.initial_twist.twist.linear.x);
if (obj_v > lane_change_parameters_->stop_velocity_threshold) {
continue;
}

Expand Down

0 comments on commit b6c9bb2

Please sign in to comment.