File tree 2 files changed +19
-0
lines changed
planning/behavior_path_planner
include/behavior_path_planner
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,8 @@ class PlannerManager
449
449
const std::vector<SceneModulePtr> & request_modules, const std::shared_ptr<PlannerData> & data,
450
450
const BehaviorModuleOutput & previous_module_output);
451
451
452
+ std::string getNames (const std::vector<SceneModulePtr> & modules) const ;
453
+
452
454
boost::optional<lanelet::ConstLanelet> root_lanelet_{boost::none};
453
455
454
456
std::vector<SceneModuleManagerPtr> manager_ptrs_;
Original file line number Diff line number Diff line change @@ -178,6 +178,14 @@ void PlannerManager::generateCombinedDrivableArea(
178
178
std::vector<SceneModulePtr> PlannerManager::getRequestModules (
179
179
const BehaviorModuleOutput & previous_module_output) const
180
180
{
181
+ if (!previous_module_output.path ) {
182
+ RCLCPP_ERROR_STREAM (
183
+ logger_, " Current module output is null. Skip candidate module check."
184
+ << " \n - Approved module list: " << getNames (approved_module_ptrs_)
185
+ << " \n - Candidate module list: " << getNames (candidate_module_ptrs_));
186
+ return {};
187
+ }
188
+
181
189
std::vector<SceneModulePtr> request_modules{};
182
190
183
191
/* *
@@ -742,4 +750,13 @@ std::shared_ptr<SceneModuleVisitor> PlannerManager::getDebugMsg()
742
750
return debug_msg_ptr_;
743
751
}
744
752
753
+ std::string PlannerManager::getNames (const std::vector<SceneModulePtr> & modules) const
754
+ {
755
+ std::stringstream ss;
756
+ for (const auto & m : modules) {
757
+ ss << " [" << m->name () << " ], " ;
758
+ }
759
+ return ss.str ();
760
+ }
761
+
745
762
} // namespace behavior_path_planner
You can’t perform that action at this time.
0 commit comments