Skip to content

Commit

Permalink
add planning_factor_interface to behavior_velocity_planner_intersections
Browse files Browse the repository at this point in the history
Signed-off-by: Mamoru Sobue <[email protected]>
  • Loading branch information
soblin committed Jan 15, 2025
1 parent 7015949 commit 1fc59d8
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ void BlindSpotModule::reactRTCApprovalByDecision(
decision.stop_line_idx, planner_data_->vehicle_info_.max_longitudinal_offset_m, *path);

const auto stop_pose = path->points.at(decision.stop_line_idx).point.pose;
velocity_factor_.set(
path->points, planner_data_->current_odometry->pose, stop_pose, VelocityFactor::UNKNOWN);
planning_factor_interface_->add(
path->points, planner_data_->current_odometry->pose, stop_pose, stop_pose,
tier4_planning_msgs::msg::PlanningFactor::STOP, tier4_planning_msgs::msg::SafetyFactorArray{},
true /*is_driving_forward*/, 0.0, 0.0 /*shift distance*/,
"blind_spot(module is judging as UNSAFE)");
}
return;
}
Expand Down Expand Up @@ -132,8 +135,11 @@ void BlindSpotModule::reactRTCApprovalByDecision(
decision.stop_line_idx, planner_data_->vehicle_info_.max_longitudinal_offset_m, *path);

const auto stop_pose = path->points.at(decision.stop_line_idx).point.pose;
velocity_factor_.set(
path->points, planner_data_->current_odometry->pose, stop_pose, VelocityFactor::UNKNOWN);
planning_factor_interface_->add(
path->points, planner_data_->current_odometry->pose, stop_pose, stop_pose,
tier4_planning_msgs::msg::PlanningFactor::STOP, tier4_planning_msgs::msg::SafetyFactorArray{},
true /*is_driving_forward*/, 0.0, 0.0 /*shift distance*/,
"blind_spot(module is judging as SAFE and RTC is not approved)");
}
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ BlindSpotModule::BlindSpotModule(
turn_direction_(turn_direction),
is_over_pass_judge_line_(false)
{
velocity_factor_.init(PlanningBehavior::REAR_CHECK);
sibling_straight_lanelet_ = getSiblingStraightLanelet(
planner_data->route_handler_->getLaneletMapPtr()->laneletLayer.get(lane_id_),
planner_data->route_handler_->getRoutingGraphPtr());
Expand Down
Loading

0 comments on commit 1fc59d8

Please sign in to comment.