@@ -287,27 +287,47 @@ class GoalPlannerModule : public SceneModuleInterface
287
287
}
288
288
}
289
289
290
- CandidateOutput planCandidate () const override ;
291
290
BehaviorModuleOutput plan () override ;
292
291
BehaviorModuleOutput planWaitingApproval () override ;
293
292
bool isExecutionRequested () const override ;
294
293
bool isExecutionReady () const override ;
295
294
void processOnExit () override ;
296
295
void updateData () override ;
296
+ void postProcess () override ;
297
297
void setParameters (const std::shared_ptr<GoalPlannerParameters> & parameters);
298
298
void acceptVisitor (
299
299
[[maybe_unused]] const std::shared_ptr<SceneModuleVisitor> & visitor) const override
300
300
{
301
301
}
302
+ CandidateOutput planCandidate () const override { return CandidateOutput{}; }
302
303
303
304
private:
305
+ /*
306
+ * state transitions and plan function used in each state
307
+ *
308
+ * +--------------------------+
309
+ * | RUNNING |
310
+ * | planPullOverAsCandidate()|
311
+ * +------------+-------------+
312
+ * | hasDecidedPath()
313
+ * 2 v
314
+ * +--------------------------+
315
+ * | WAITING_APPROVAL |
316
+ * | planPullOverAsCandidate()|
317
+ * +------------+-------------+
318
+ * | isActivated()
319
+ * 3 v
320
+ * +--------------------------+
321
+ * | RUNNING |
322
+ * | planPullOverAsOutput() |
323
+ * +--------------------------+
324
+ */
325
+
304
326
// The start_planner activates when it receives a new route,
305
327
// so there is no need to terminate the goal planner.
306
328
// If terminating it, it may switch to lane following and could generate an inappropriate path.
307
329
bool canTransitSuccessState () override { return false ; }
308
-
309
330
bool canTransitFailureState () override { return false ; }
310
-
311
331
bool canTransitIdleToRunningState () override { return true ; }
312
332
313
333
mutable StartGoalPlannerData goal_planner_data_;
@@ -411,8 +431,9 @@ class GoalPlannerModule : public SceneModuleInterface
411
431
void returnToLaneParking ();
412
432
413
433
// plan pull over path
414
- BehaviorModuleOutput planWithGoalModification ();
415
- BehaviorModuleOutput planWaitingApprovalWithGoalModification ();
434
+ BehaviorModuleOutput planPullOver ();
435
+ BehaviorModuleOutput planPullOverAsOutput ();
436
+ BehaviorModuleOutput planPullOverAsCandidate ();
416
437
void selectSafePullOverPath ();
417
438
std::vector<PullOverPath> sortPullOverPathCandidatesByGoalPriority (
418
439
const std::vector<PullOverPath> & pull_over_path_candidates,
0 commit comments