File tree 1 file changed +10
-5
lines changed
planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -125,16 +125,21 @@ BehaviorModuleOutput LaneChangeInterface::plan()
125
125
} else {
126
126
const auto path =
127
127
assignToCandidate (module_type_->getLaneChangePath (), module_type_->getEgoPosition ());
128
- const auto force_activated = std::any_of (
128
+ const auto is_registered = std::any_of (
129
129
rtc_interface_ptr_map_.begin (), rtc_interface_ptr_map_.end (),
130
- [&](const auto & rtc) { return rtc.second ->isForceActivated (uuid_map_.at (rtc.first )); });
131
- if (!force_activated) {
130
+ [&](const auto & rtc) { return rtc.second ->isRegistered (uuid_map_.at (rtc.first )); });
131
+
132
+ if (!is_registered) {
132
133
updateRTCStatus (
133
134
path.start_distance_to_path_change , path.finish_distance_to_path_change , true ,
134
- State::RUNNING );
135
+ State::WAITING_FOR_EXECUTION );
135
136
} else {
137
+ const auto force_activated = std::any_of (
138
+ rtc_interface_ptr_map_.begin (), rtc_interface_ptr_map_.end (),
139
+ [&](const auto & rtc) { return rtc.second ->isForceActivated (uuid_map_.at (rtc.first )); });
140
+ const bool safe = force_activated ? false : true ;
136
141
updateRTCStatus (
137
- path.start_distance_to_path_change , path.finish_distance_to_path_change , false ,
142
+ path.start_distance_to_path_change , path.finish_distance_to_path_change , safe ,
138
143
State::RUNNING);
139
144
}
140
145
}
You can’t perform that action at this time.
0 commit comments