Skip to content

Commit a732f48

Browse files
modify flowchart
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
1 parent f052a6f commit a732f48

File tree

1 file changed

+53
-23
lines changed
  • planning/behavior_path_start_planner_module

1 file changed

+53
-23
lines changed

planning/behavior_path_start_planner_module/README.md

+53-23
Original file line numberDiff line numberDiff line change
@@ -91,36 +91,66 @@ The `StartPlannerModule` is designed to initiate its execution based on specific
9191

9292
### **End Conditions**
9393

94-
The `StartPlannerModule` terminates if the pull out / freespace maneuver has been completed. The `canTransitSuccessState` function assesses these conditions to decide if the module should terminate its execution.
94+
The `StartPlannerModule` terminates when specific conditions are met, depending on the type of planner being used. The `canTransitSuccessState` function determines whether the module should transition to the success state based on the following criteria:
9595

96-
```plantuml
97-
@startuml
98-
start
99-
:Start hasFinishedPullOut();
96+
#### When the Freespace Planner is active:
10097

101-
if (status_.driving_forward && status_.found_pull_out_path) then (yes)
98+
- If the end point of the freespace path is reached, the module transitions to the success state.
10299

103-
if (status_.planner_type == FREESPACE) then (yes)
104-
:Calculate distance\nto pull_out_path.end_pose;
105-
if (distance < th_arrived_distance) then (yes)
106-
:return true;\n(Terminate module);
107-
else (no)
108-
:return false;\n(Continue running);
109-
endif
110-
else (no)
111-
:Calculate arclength for\ncurrent_pose and pull_out_path.end_pose;
112-
if (arclength_current - arclength_pull_out_end > offset) then (yes)
113-
:return true;\n(Terminate module);
114-
else (no)
115-
:return false;\n(Continue running);
116-
endif
117-
endif
100+
#### When any other type of planner is active:
101+
102+
The transition to the success state is determined by the following conditions:
103+
104+
- If a reverse path is being generated or the search for a pull out path fails:
105+
- The module does not transition to the success state.
106+
- If the end point of the pull out path's shift section is reached:
107+
- The module transitions to the success state.
108+
109+
The flowchart below illustrates the decision-making process in the `canTransitSuccessState` function:
118110

111+
```plantuml
112+
@startuml
113+
@startuml
114+
skinparam ActivityBackgroundColor #white
115+
skinparam ActivityBorderColor #black
116+
skinparam ActivityBorderThickness 1
117+
skinparam ActivityArrowColor #black
118+
skinparam ActivityArrowThickness 1
119+
skinparam ActivityStartColor #black
120+
skinparam ActivityEndColor #black
121+
skinparam ActivityDiamondBackgroundColor #white
122+
skinparam ActivityDiamondBorderColor #black
123+
skinparam ActivityDiamondFontColor #black
124+
partition canTransitSuccessState() {
125+
start
126+
if (planner type is FREESPACE?) then (yes)
127+
if (Has reached freespace end?) then (yes)
128+
#FF006C:true;
129+
stop
119130
else (no)
120-
:return false;\n(Continue running);
131+
:false;
132+
stop
121133
endif
122-
134+
else (no)
135+
if (driving is forward?) then (yes)
136+
if (pull out path is found?) then (yes)
137+
if (Has reached pull out end?) then (yes)
138+
#FF006C:true;
123139
stop
140+
else (no)
141+
:false;
142+
stop
143+
endif
144+
else (no)
145+
:false;
146+
stop
147+
endif
148+
else (no)
149+
:false;
150+
stop
151+
endif
152+
endif
153+
}
124154
@enduml
125155
```
126156

0 commit comments

Comments
 (0)