forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(autoware_pointcloud_preprocessor): rework concatenate_pointc…
…loud and time_synchronizer_node parameters (autowarefoundation#8509) * feat: rewort concatenate pointclouds and time synchronizer parameter Signed-off-by: vividf <[email protected]> * chore: fix launch files Signed-off-by: vividf <[email protected]> * chore: fix schema Signed-off-by: vividf <[email protected]> * chore: fix schema Signed-off-by: vividf <[email protected]> * chore: fix integer and number default value in schema Signed-off-by: vividf <[email protected]> * chore: add boundary Signed-off-by: vividf <[email protected]> --------- Signed-off-by: vividf <[email protected]>
- Loading branch information
1 parent
7f450dc
commit 10093e8
Showing
11 changed files
with
205 additions
and
22 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
11 changes: 11 additions & 0 deletions
11
sensing/autoware_pointcloud_preprocessor/config/concatenate_pointclouds.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,11 @@ | ||
/**: | ||
ros__parameters: | ||
output_frame: base_link | ||
input_topics: [ | ||
"/sensing/lidar/left/pointcloud_before_sync", | ||
"/sensing/lidar/right/pointcloud_before_sync", | ||
"/sensing/lidar/top/pointcloud_before_sync" | ||
] | ||
max_queue_size: 5 | ||
timeout_sec: 0.033 | ||
input_offset: [0.0 ,0.0 ,0.0] |
14 changes: 14 additions & 0 deletions
14
sensing/autoware_pointcloud_preprocessor/config/time_synchronizer_node.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,14 @@ | ||
/**: | ||
ros__parameters: | ||
input_twist_topic_type: twist | ||
output_frame: base_link | ||
keep_input_frame_in_synchronized_pointcloud: false | ||
input_topics: [ | ||
"/sensing/lidar/left/pointcloud_before_sync", | ||
"/sensing/lidar/right/pointcloud_before_sync", | ||
"/sensing/lidar/top/pointcloud_before_sync" | ||
] | ||
synchronized_pointcloud_postfix: pointcloud | ||
max_queue_size: 5 | ||
timeout_sec: 0.033 | ||
input_offset: [0.0, 0.0, 0.0] |
2 changes: 1 addition & 1 deletion
2
...sor/include/autoware/pointcloud_preprocessor/concatenate_data/concatenate_pointclouds.hpp
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
9 changes: 9 additions & 0 deletions
9
sensing/autoware_pointcloud_preprocessor/launch/concatenate_pointcloud.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<launch> | ||
<arg name="output" default="/sensing/lidar/concatenated/pointcloud"/> | ||
<!-- Parameter --> | ||
<arg name="param_file" default="$(find-pkg-share autoware_pointcloud_preprocessor)/config/concatenate_pointclouds.param.yaml"/> | ||
<node pkg="autoware_pointcloud_preprocessor" exec="concatenate_pointclouds_node" name="concatenate_pointclouds_node" output="screen"> | ||
<remap from="output" to="$(var output)"/> | ||
<param from="$(var param_file)"/> | ||
</node> | ||
</launch> |
9 changes: 9 additions & 0 deletions
9
sensing/autoware_pointcloud_preprocessor/launch/time_synchronizer_node.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<launch> | ||
<arg name="input/twist" default="/sensing/vehicle_velocity_converter/twist_with_covariance"/> | ||
<!-- Parameter --> | ||
<arg name="param_file" default="$(find-pkg-share autoware_pointcloud_preprocessor)/config/time_synchronizer_node.param.yaml"/> | ||
<node pkg="autoware_pointcloud_preprocessor" exec="time_synchronizer_node" name="time_synchronizer_node" output="screen"> | ||
<remap from="~/input/twist" to="$(var input/twist)"/> | ||
<param from="$(var param_file)"/> | ||
</node> | ||
</launch> |
58 changes: 58 additions & 0 deletions
58
sensing/autoware_pointcloud_preprocessor/schema/concatenate_pointclouds.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,58 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Concatenate Pointclouds Node", | ||
"type": "object", | ||
"definitions": { | ||
"concatenate_pointclouds": { | ||
"type": "object", | ||
"properties": { | ||
"timeout_sec": { | ||
"type": "number", | ||
"default": "0.1", | ||
"minimum": 0, | ||
"description": "Tolerance of time to publish the next pointcloud [s]. When this time limit is exceeded, the filter concatenates and publishes pointcloud, even if not all the point clouds are subscribed." | ||
}, | ||
"input_offset": { | ||
"type": "array", | ||
"items": { | ||
"type": "number" | ||
}, | ||
"default": [], | ||
"description": "This parameter can control waiting time for each input sensor pointcloud [s]. You must to set the same length of offsets with input pointclouds numbers." | ||
}, | ||
"output_frame": { | ||
"type": "string", | ||
"default": "base_link", | ||
"description": "Output frame id." | ||
}, | ||
"input_topics": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"default": [], | ||
"description": "List of input topics." | ||
}, | ||
"max_queue_size": { | ||
"type": "integer", | ||
"default": "5", | ||
"minimum": 1, | ||
"description": "Max queue size of input/output topics." | ||
} | ||
}, | ||
"required": ["timeout_sec", "input_offset", "output_frame", "input_topics", "max_queue_size"] | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"$ref": "#/definitions/concatenate_pointclouds" | ||
} | ||
}, | ||
"required": ["ros__parameters"] | ||
} | ||
}, | ||
"required": ["/**"] | ||
} |
83 changes: 83 additions & 0 deletions
83
sensing/autoware_pointcloud_preprocessor/schema/time_synchronizer_node.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,83 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Time synchronizer Node", | ||
"type": "object", | ||
"definitions": { | ||
"time_synchronizer": { | ||
"type": "object", | ||
"properties": { | ||
"timeout_sec": { | ||
"type": "number", | ||
"default": "0.033", | ||
"minimum": 0, | ||
"description": "Tolerance of time to publish the next pointcloud [s]. When this time limit is exceeded, the filter concatenates and publishes pointcloud, even if not all the point clouds are subscribed." | ||
}, | ||
"input_offset": { | ||
"type": "array", | ||
"items": { | ||
"type": "number" | ||
}, | ||
"default": [], | ||
"description": "This parameter can control waiting time for each input sensor pointcloud [s]. You must to set the same length of offsets with input pointclouds numbers." | ||
}, | ||
"input_twist_topic_type": { | ||
"type": "string", | ||
"enum": ["twist", "odom"], | ||
"default": "twist", | ||
"description": "Topic type for twist. Currently supports 'twist' or 'odom'." | ||
}, | ||
"output_frame": { | ||
"type": "string", | ||
"default": "base_link", | ||
"description": "Output frame." | ||
}, | ||
"keep_input_frame_in_synchronized_pointcloud": { | ||
"type": "boolean", | ||
"default": true, | ||
"description": "Flag to indicate if input frame should be kept in synchronized point cloud." | ||
}, | ||
"input_topics": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"default": [], | ||
"description": "List of input topics." | ||
}, | ||
"synchronized_pointcloud_postfix": { | ||
"type": "string", | ||
"default": "pointcloud", | ||
"description": "Postfix for the synchronized point cloud." | ||
}, | ||
"max_queue_size": { | ||
"type": "integer", | ||
"default": "5", | ||
"minimum": 1, | ||
"description": "Max queue size of input/output topics." | ||
} | ||
}, | ||
"required": [ | ||
"timeout_sec", | ||
"input_offset", | ||
"input_twist_topic_type", | ||
"output_frame", | ||
"keep_input_frame_in_synchronized_pointcloud", | ||
"input_topics", | ||
"synchronized_pointcloud_postfix", | ||
"max_queue_size" | ||
] | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"$ref": "#/definitions/time_synchronizer" | ||
} | ||
}, | ||
"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
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