-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(lanelet2_map_preprocessor): rework parameter #6218
Merged
Motsu-san
merged 5 commits into
autowarefoundation:main
from
Motsu-san:refactor/rework_parameter_lanelet2_map_preprocessor
Feb 20, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
68f9ddb
refactor: Create .yaml file for default parameters of transform_maps.…
Motsu-san 1f93749
refactor: Create JSON Schema file of transform_maps
Motsu-san 272380d
refactor: Replace .launch path parameters to .yaml ones
Motsu-san fbef4e1
refactor: Create .yaml file for default parameters of fix_z_value_by_…
Motsu-san 5a710cc
style(pre-commit): autofix
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -29,5 +29,6 @@ if(BUILD_TESTING) | |
endif() | ||
|
||
ament_auto_package(INSTALL_TO_SHARE | ||
config | ||
launch | ||
) |
5 changes: 5 additions & 0 deletions
5
map/util/lanelet2_map_preprocessor/config/fix_z_value_by_pcd.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,5 @@ | ||
/**: | ||
ros__parameters: | ||
llt_map_path: $(var llt_map_path) | ||
pcd_map_path: $(var pcd_map_path) | ||
llt_output_path: $(var llt_output_path) |
12 changes: 12 additions & 0 deletions
12
map/util/lanelet2_map_preprocessor/config/transform_maps.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,12 @@ | ||
/**: | ||
ros__parameters: | ||
llt_map_path: $(var llt_map_path) | ||
pcd_map_path: $(var pcd_map_path) | ||
llt_output_path: $(var llt_output_path) | ||
pcd_output_path: $(var pcd_output_path) | ||
x: 0.0 | ||
y: 0.0 | ||
z: 0.0 | ||
roll: 0.0 | ||
pitch: 0.0 | ||
yaw: 0.0 |
8 changes: 1 addition & 7 deletions
8
map/util/lanelet2_map_preprocessor/launch/fix_z_value_by_pcd.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,12 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<launch> | ||
<arg name="llt_map_path" default=""/> | ||
<arg name="pcd_map_path" default=""/> | ||
<arg name="llt_output_path" default=""/> | ||
|
||
<node pkg="lanelet2_map_preprocessor" exec="fix_z_value_by_pcd" name="fix_z_value_by_pcd" output="screen"> | ||
<param name="llt_map_path" value="$(var llt_map_path)"/> | ||
<param name="pcd_map_path" value="$(var pcd_map_path)"/> | ||
<param name="llt_output_path" value="$(var llt_output_path)"/> | ||
<param from="$(find-pkg-share lanelet2_map_preprocessor)/config/fix_z_value_by_pcd.param.yaml" allow_substs="true"/> | ||
</node> | ||
</launch> |
22 changes: 1 addition & 21 deletions
22
map/util/lanelet2_map_preprocessor/launch/transform_maps.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,26 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<launch> | ||
<arg name="llt_map_path" default=""/> | ||
<arg name="pcd_map_path" default=""/> | ||
<arg name="llt_output_path" default=""/> | ||
<arg name="pcd_output_path" default=""/> | ||
<arg name="x" default="0.0"/> | ||
<arg name="y" default="0.0"/> | ||
<arg name="z" default="0.0"/> | ||
<arg name="roll" default="0.0"/> | ||
<arg name="pitch" default="0.0"/> | ||
<arg name="yaw" default="0.0"/> | ||
|
||
<node pkg="lanelet2_map_preprocessor" exec="transform_maps" name="transform_maps" output="screen"> | ||
<param name="llt_map_path" value="$(var llt_map_path)"/> | ||
<param name="pcd_map_path" value="$(var pcd_map_path)"/> | ||
<param name="llt_output_path" value="$(var llt_output_path)"/> | ||
<param name="pcd_output_path" value="$(var pcd_output_path)"/> | ||
<param name="x" value="$(var x)"/> | ||
<param name="y" value="$(var y)"/> | ||
<param name="z" value="$(var z)"/> | ||
<param name="roll" value="$(var roll)"/> | ||
<param name="pitch" value="$(var pitch)"/> | ||
<param name="yaw" value="$(var yaw)"/> | ||
<param from="$(find-pkg-share lanelet2_map_preprocessor)/config/transform_maps.param.yaml" allow_substs="true"/> | ||
</node> | ||
</launch> |
75 changes: 75 additions & 0 deletions
75
map/util/lanelet2_map_preprocessor/schema/transform_maps.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,75 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Transforming Maps", | ||
"type": "object", | ||
"definitions": { | ||
"transform_maps": { | ||
"type": "object", | ||
"properties": { | ||
"llt_map_path": { | ||
"type": "string", | ||
"description": "Path pointing to the input lanelet2 file", | ||
"default": "" | ||
}, | ||
"pcd_map_path": { | ||
"type": "string", | ||
"description": "Path pointing to the input point cloud file", | ||
"default": "" | ||
}, | ||
"llt_output_path": { | ||
"type": "string", | ||
"description": "Path pointing to the output lanelet2 file", | ||
"default": "" | ||
}, | ||
"pcd_output_path": { | ||
"type": "string", | ||
"description": "Path pointing to the output point cloud file", | ||
"default": "" | ||
}, | ||
"x": { | ||
"type": "number", | ||
"default": 0.0, | ||
"description": "x factor of Translation vector for transforming maps [m]" | ||
}, | ||
"y": { | ||
"type": "number", | ||
"default": 0.0, | ||
"description": "y factor of Translation vector for transforming maps [m]" | ||
}, | ||
"z": { | ||
"type": "number", | ||
"default": 0.0, | ||
"description": "z factor of Translation vector for transforming maps [m]" | ||
}, | ||
"roll": { | ||
"type": "number", | ||
"default": 0.0, | ||
"description": "roll factor of Rotation vector for transforming maps [rad]" | ||
}, | ||
"pitch": { | ||
"type": "number", | ||
"default": 0.0, | ||
"description": "pitch factor of Rotation vector for transforming maps [rad]" | ||
}, | ||
"yaw": { | ||
"type": "number", | ||
"default": 0.0, | ||
"description": "yaw factor of Rotation vector for transforming maps [rad]" | ||
} | ||
}, | ||
"required": ["x", "y", "z", "roll", "pitch", "yaw"] | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"$ref": "#/definitions/transform_maps" | ||
} | ||
}, | ||
"required": ["ros__parameters"] | ||
} | ||
}, | ||
"required": ["/**"] | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be schema for map paths as well:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modified it as you said. Thank you.