-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use just one pipeline generator+filter definition file
- Loading branch information
Showing
7 changed files
with
220 additions
and
175 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
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 was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
mrpt_pointcloud_pipeline/params/per-observation-pipeline.yaml
This file was deleted.
Oops, something went wrong.
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,90 @@ | ||
# ----------------------------------------------------------------------------- | ||
# mp2p_icp filters definition file for mrpt_pointcloud_pipeline | ||
# | ||
# See docs for MP2P_ICP library: https://docs.mola-slam.org/mp2p_icp/ | ||
# ----------------------------------------------------------------------------- | ||
|
||
# --------------------------------------------------------------- | ||
# 1) Create temporary point map to accumulate 1+ sensor observations: | ||
# --------------------------------------------------------------- | ||
generators: | ||
- class_name: mp2p_icp_filters::Generator | ||
params: | ||
target_layer: 'accumulated_points' | ||
throw_on_unhandled_observation_class: true | ||
process_class_names_regex: '' # NONE: don't process observations in the generator, just used to create the metric map. | ||
#process_sensor_labels_regex: '.*' | ||
# metric_map_definition_ini_file: '${CURRENT_YAML_FILE_PATH}/map_definition.ini' # Use either an external INI file, or the 'metric_map_definition' YAML entry below | ||
|
||
metric_map_definition: | ||
# Any class derived from mrpt::maps::CMetricMap https://docs.mrpt.org/reference/latest/group_mrpt_maps_grp.html | ||
class: mrpt::maps::CSimplePointsMap | ||
#creationOpts: # none needed | ||
#insertionOpts: # none needed | ||
#renderOpts: # none needed | ||
|
||
# Then, use default generator: generate the observation raw points | ||
- class_name: mp2p_icp_filters::Generator | ||
params: | ||
target_layer: 'raw' | ||
throw_on_unhandled_observation_class: true | ||
process_class_names_regex: '.*' | ||
process_sensor_labels_regex: '.*' | ||
|
||
|
||
# --------------------------------------------------------------- | ||
# 2) Pipeline for each individual observation | ||
# --------------------------------------------------------------- | ||
per_observation: | ||
# Remove the robot body: | ||
- class_name: mp2p_icp_filters::FilterBoundingBox | ||
params: | ||
input_pointcloud_layer: 'raw' | ||
outside_pointcloud_layer: 'filtered' | ||
bounding_box_min: [ -1.0, -1.0, -2 ] | ||
bounding_box_max: [ 1.0, 1.0, 2 ] | ||
|
||
- class_name: mp2p_icp_filters::FilterMerge | ||
params: | ||
input_pointcloud_layer: 'filtered' | ||
target_layer: 'accumulated_points' | ||
|
||
# --------------------------------------------------------------- | ||
# 3) Pipeline to apply to the merged data | ||
# --------------------------------------------------------------- | ||
final: | ||
# Remove points that are too far: | ||
- class_name: mp2p_icp_filters::FilterBoundingBox | ||
params: | ||
input_pointcloud_layer: 'accumulated_points' | ||
inside_pointcloud_layer: 'layer1' | ||
bounding_box_min: [ -20.0, -20.0, 0.1 ] | ||
bounding_box_max: [ 20.0, 20.0, 1.5 ] | ||
|
||
# Split into nearby and distant | ||
- class_name: mp2p_icp_filters::FilterBoundingBox | ||
params: | ||
input_pointcloud_layer: 'layer1' | ||
inside_pointcloud_layer: 'close' | ||
outside_pointcloud_layer: 'far' | ||
bounding_box_min: [ -6.0, -6.0, -3.0 ] | ||
bounding_box_max: [ 6.0, 6.0, 3.0 ] | ||
|
||
# Downsample points: | ||
- class_name: mp2p_icp_filters::FilterDecimateVoxels | ||
params: | ||
input_pointcloud_layer: 'close' | ||
output_pointcloud_layer: 'output' | ||
voxel_filter_resolution: 0.10 # [m] | ||
decimate_method: DecimateMethod::ClosestToAverage | ||
# This option flattens the 3D point cloud into a 2D one: | ||
flatten_to: 1.0 # [m] | ||
|
||
- class_name: mp2p_icp_filters::FilterDecimateVoxels | ||
params: | ||
input_pointcloud_layer: 'far' | ||
output_pointcloud_layer: 'output' | ||
voxel_filter_resolution: 0.5 # [m] | ||
decimate_method: DecimateMethod::ClosestToAverage | ||
# This option flattens the 3D point cloud into a 2D one: | ||
flatten_to: 1.0 # [m] |
Oops, something went wrong.