-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(scenario_selector): rework parameters (#5218)
* refactor(scenario_selector): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * style(pre-commit): autofix * refactor(scenario_selector): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(scenario_selector): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> --------- Signed-off-by: PhoebeWu21 <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
033edff
commit 27ac617
Showing
5 changed files
with
74 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,5 @@ endif() | |
|
||
ament_auto_package(INSTALL_TO_SHARE | ||
launch | ||
config | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
planning/scenario_selector/config/scenario_selector.param.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/**: | ||
ros__parameters: | ||
update_rate: 10.0 | ||
th_max_message_delay_sec: 1.0 | ||
th_arrived_distance_m: 1.0 | ||
th_stopped_time_sec: 1.0 | ||
th_stopped_velocity_mps: 0.01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
planning/scenario_selector/schema/scenario_selector.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Scenario Selector Node", | ||
"type": "object", | ||
"definitions": { | ||
"scenario_selector": { | ||
"type": "object", | ||
"properties": { | ||
"update_rate": { | ||
"type": "number", | ||
"description": "timer's update rate", | ||
"default": "10.0", | ||
"minimum": 0.0 | ||
}, | ||
"th_max_message_delay_sec": { | ||
"type": "number", | ||
"description": "threshold time of input messages' maximum delay", | ||
"default": "1.0", | ||
"minimum": 0.0 | ||
}, | ||
"th_arrived_distance_m": { | ||
"type": "number", | ||
"description": "threshold distance to check if vehicle has arrived at the trajectory's endpoint", | ||
"default": "1.0", | ||
"minimum": 0.0 | ||
}, | ||
"th_stopped_time_sec": { | ||
"type": "number", | ||
"description": "threshold time to check if vehicle is stopped", | ||
"default": "1.0", | ||
"minimum": 0.0 | ||
}, | ||
"th_stopped_velocity_mps": { | ||
"type": "number", | ||
"description": "threshold velocity to check if vehicle is stopped", | ||
"default": "0.01", | ||
"minimum": 0.0 | ||
} | ||
}, | ||
"required": [ | ||
"update_rate", | ||
"th_max_message_delay_sec", | ||
"th_arrived_distance_m", | ||
"th_stopped_time_sec", | ||
"th_stopped_velocity_mps" | ||
] | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"$ref": "#/definitions/scenario_selector" | ||
} | ||
}, | ||
"required": ["ros__parameters"] | ||
} | ||
}, | ||
"required": ["/**"] | ||
} |