Skip to content

Commit 238fc0f

Browse files
takayuki5168chtseng
authored and
chtseng
committed
refactor(crosswalk): clean up the structure and create a brief flowchart (autowarefoundation#7868)
* refactor(crosswalk): clean up the structure and create a brief flowchart Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * update Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * static stop pose -> default stop pose Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> --------- Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> Signed-off-by: chtseng <chtseng@itri.org.tw>
1 parent f518c35 commit 238fc0f

File tree

7 files changed

+234
-181
lines changed

7 files changed

+234
-181
lines changed

planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/README.md

+35
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,41 @@ This module judges whether the ego should stop in front of the crosswalk in orde
88
![crosswalk_module](docs/crosswalk_module.svg){width=1100}
99
</figure>
1010

11+
## Flowchart
12+
13+
```plantuml
14+
@startuml
15+
skinparam monochrome true
16+
17+
title modifyPathVelocity
18+
start
19+
:getPathEndPointsOnCrosswalk;
20+
group apply slow down
21+
:applySlowDownByLanleet2Map;
22+
:applySlowDownByOcclusion;
23+
end group
24+
group calculate stop pose
25+
:getDefaultStopPose;
26+
:resamplePath;
27+
:checkStopForCrosswalkUsers;
28+
:checkStopForStuckVehicles;
29+
end group
30+
group apply stop
31+
:getNearestStopFactor;
32+
:setSafe;
33+
:setDistanceToStop;
34+
35+
if (isActivated() is True?) then (yes)
36+
:planGo;
37+
else (no)
38+
:planStop;
39+
endif
40+
end group
41+
42+
stop
43+
@enduml
44+
```
45+
1146
## Features
1247

1348
### Yield the Way to the Pedestrians

planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/include/autoware/behavior_velocity_crosswalk_module/util.hpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,14 @@ std::set<int64_t> getCrosswalkIdSetOnPath(
9797

9898
bool checkRegulatoryElementExistence(const lanelet::LaneletMapPtr & lanelet_map_ptr);
9999

100-
std::vector<geometry_msgs::msg::Point> getPolygonIntersects(
100+
std::optional<std::pair<geometry_msgs::msg::Point, geometry_msgs::msg::Point>>
101+
getPathEndPointsOnCrosswalk(
101102
const PathWithLaneId & ego_path, const lanelet::BasicPolygon2d & polygon,
102-
const geometry_msgs::msg::Point & ego_pos, const size_t max_num);
103+
const geometry_msgs::msg::Point & ego_pos);
103104

104105
std::vector<geometry_msgs::msg::Point> getLinestringIntersects(
105106
const PathWithLaneId & ego_path, const lanelet::BasicLineString2d & linestring,
106-
const geometry_msgs::msg::Point & ego_pos, const size_t max_num);
107+
const geometry_msgs::msg::Point & ego_pos);
107108

108109
std::optional<lanelet::ConstLineString3d> getStopLineFromMap(
109110
const lanelet::Id lane_id, const lanelet::LaneletMapPtr & lanelet_map_ptr,

0 commit comments

Comments
 (0)