forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(map_projection_loader): rework parameters (autowarefoundatio…
…n#6253) * Extract all params in map_projection_loader to map_projection_loader.param.yaml Added launch argument map_projection_loader_param_path to map.launch.xml Signed-off-by: TaikiYamada4 <[email protected]> * Added map_projection_loader.schema.json. Modified README.md of map_projection_loader to read the schema.json file to construct the table of parameters Signed-off-by: TaikiYamada4 <[email protected]> * style(pre-commit): autofix * Fixed typo Signed-off-by: TaikiYamada4 <[email protected]> --------- Signed-off-by: TaikiYamada4 <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kotaro Yoshimoto <[email protected]>
- Loading branch information
1 parent
a20b35d
commit 0f40ff5
Showing
6 changed files
with
52 additions
and
7 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
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 |
---|---|---|
|
@@ -59,4 +59,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
4 changes: 4 additions & 0 deletions
4
map/map_projection_loader/config/map_projection_loader.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,4 @@ | ||
/**: | ||
ros__parameters: | ||
map_projector_info_path: $(var map_projector_info_path) | ||
lanelet2_map_path: $(var lanelet2_map_path) |
5 changes: 3 additions & 2 deletions
5
map/map_projection_loader/launch/map_projection_loader.launch.xml
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<launch> | ||
<arg name="param_path" default="$(find-pkg-share map_projection_loader)/config/map_projection_loader.param.yaml"/> | ||
|
||
<arg name="map_projector_info_path" description="Path to the yaml file"/> | ||
<arg name="lanelet2_map_path" description="Path to the lanelet2 map file"/> | ||
|
||
<node pkg="map_projection_loader" exec="map_projection_loader" name="map_projection_loader" output="screen"> | ||
<param name="map_projector_info_path" value="$(var map_projector_info_path)"/> | ||
<param name="lanelet2_map_path" value="$(var lanelet2_map_path)"/> | ||
<param from="$(var param_path)" allow_substs="true"/> | ||
</node> | ||
</launch> |
38 changes: 38 additions & 0 deletions
38
map/map_projection_loader/schema/map_projection_loader.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,38 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for map_projection_loader", | ||
"type": "object", | ||
"definitions": { | ||
"map_projection_loader": { | ||
"type": "object", | ||
"properties": { | ||
"map_projector_info_path": { | ||
"type": "string", | ||
"description": "The path where map_projector_info.yaml is located", | ||
"default": "$(var map_projector_info_path)" | ||
}, | ||
"lanelet2_map_path": { | ||
"type": "string", | ||
"description": "The path where the lanelet2 map file (.osm) is located", | ||
"default": "$(var lanelet2_map_path)" | ||
} | ||
}, | ||
"required": ["map_projector_info_path", "lanelet2_map_path"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"$ref": "#/definitions/map_projection_loader" | ||
} | ||
}, | ||
"required": ["ros__parameters"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": ["/**"], | ||
"additionalProperties": false | ||
} |