Skip to content

Commit e181dce

Browse files
authoredJul 26, 2023
refactor(behavior_velocity_stop_line_module): clean stop line module (#4394)
Signed-off-by: yutaka <purewater0901@gmail.com>
1 parent ffd2a4b commit e181dce

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed
 

‎planning/behavior_velocity_stop_line_module/README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ This module is activated when there is a stop line in a target lane.
1212

1313
### Module Parameters
1414

15-
| Parameter | Type | Description |
16-
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------- |
17-
| `stop_margin` | double | a margin that the vehicle tries to stop before stop_line |
18-
| `stop_check_dist` | double | when the vehicle is within `stop_check_dist` from stop_line and stopped, move to STOPPED state |
19-
| `hold_stop_margin_distance` | double | [m] parameter for restart prevention (See Algorithm section) |
15+
| Parameter | Type | Description |
16+
| -------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17+
| `stop_margin` | double | a margin that the vehicle tries to stop before stop_line |
18+
| `stop_duration_sec` | double | [s] time parameter for the ego vehicle to stop in front of a stop line |
19+
| `hold_stop_margin_distance` | double | [m] parameter for restart prevention (See Algorithm section). Also, when the ego vehicle is within this distance from a stop line, the ego state becomes STOPPED from APPROACHING |
20+
| `use_initialization_stop_state` | bool | A flag to determine whether to return to the approaching state when the vehicle moves away from a stop line. |
21+
| `show_stop_line_collision_check` | bool | A flag to determine whether to show the debug information of collision check with a stop line |
2022

2123
### Inner-workings / Algorithms
2224

‎planning/behavior_velocity_stop_line_module/config/stop_line.param.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
ros__parameters:
33
stop_line:
44
stop_margin: 0.0
5-
stop_check_dist: 2.0
65
stop_duration_sec: 1.0
76
use_initialization_stop_line_state: true
87
hold_stop_margin_distance: 2.0
98

109
debug:
11-
show_stopline_collision_check: false # [-] whether to show stopline collision
10+
show_stop_line_collision_check: false # [-] whether to show stopline collision

‎planning/behavior_velocity_stop_line_module/src/debug.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ visualization_msgs::msg::MarkerArray createStopLineCollisionCheck(
8787
visualization_msgs::msg::MarkerArray StopLineModule::createDebugMarkerArray()
8888
{
8989
visualization_msgs::msg::MarkerArray debug_marker_array;
90-
if (planner_param_.show_stopline_collision_check) {
90+
if (planner_param_.show_stop_line_collision_check) {
9191
appendMarkerArray(
9292
createStopLineCollisionCheck(debug_data_, module_id_), &debug_marker_array,
9393
this->clock_->now());

‎planning/behavior_velocity_stop_line_module/src/manager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ StopLineModuleManager::StopLineModuleManager(rclcpp::Node & node)
3434
p.use_initialization_stop_line_state =
3535
node.declare_parameter<bool>(ns + ".use_initialization_stop_line_state");
3636
// debug
37-
p.show_stopline_collision_check =
38-
node.declare_parameter<bool>(ns + ".debug.show_stopline_collision_check");
37+
p.show_stop_line_collision_check =
38+
node.declare_parameter<bool>(ns + ".debug.show_stop_line_collision_check");
3939
}
4040

4141
std::vector<StopLineWithLaneId> StopLineModuleManager::getStopLinesWithLaneIdOnPath(

‎planning/behavior_velocity_stop_line_module/src/scene.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class StopLineModule : public SceneModuleInterface
7474
double stop_duration_sec;
7575
double hold_stop_margin_distance;
7676
bool use_initialization_stop_line_state;
77-
bool show_stopline_collision_check;
77+
bool show_stop_line_collision_check;
7878
};
7979

8080
public:

0 commit comments

Comments
 (0)
Please sign in to comment.