Skip to content

Commit e0dd101

Browse files
committed
Generator new param 'filterOutPointsAtZero', set to true in demo pipelines
1 parent bd98aa0 commit e0dd101

11 files changed

Lines changed: 26 additions & 10 deletions

demos/sm2mm_bonxai_voxelmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ generators:
4343
throw_on_unhandled_observation_class: true
4444
process_class_names_regex: ".*"
4545
#process_sensor_labels_regex: '.*'
46+
filterOutPointsAtZero: true # Remove invalid points in 'organized' LiDAR scans
4647

4748
# --------------------------------------------------------
4849
# 2) Per local frame filtering

demos/sm2mm_bonxai_voxelmap_gridmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ generators:
4343
throw_on_unhandled_observation_class: true
4444
process_class_names_regex: ".*"
4545
#process_sensor_labels_regex: '.*'
46+
filterOutPointsAtZero: true # Remove invalid points in 'organized' LiDAR scans
4647

4748
# --------------------------------------------------------
4849
# 2) Per local frame filtering

demos/sm2mm_bonxai_voxelmap_gridmap_no_deskew.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ generators:
4343
throw_on_unhandled_observation_class: true
4444
process_class_names_regex: ".*"
4545
#process_sensor_labels_regex: '.*'
46+
filterOutPointsAtZero: true # Remove invalid points in 'organized' LiDAR scans
4647

4748
# --------------------------------------------------------
4849
# 2) Per local frame filtering

demos/sm2mm_no_decim_imu.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
# --------------------------------------------------------
1414
# 1) Generator (observation -> local frame metric maps)
1515
# --------------------------------------------------------
16-
#generators:
17-
# - class_name: mp2p_icp_filters::Generator
18-
# params: ~
16+
generators:
17+
- class_name: mp2p_icp_filters::Generator
18+
params:
19+
filterOutPointsAtZero: true # Remove invalid points in 'organized' LiDAR scans
1920

2021
# --------------------------------------------------------
2122
# 2) Per local frame filtering

demos/sm2mm_no_decim_imu_mls.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ generators:
1717
- class_name: mp2p_icp_filters::Generator
1818
params:
1919
generate_view_vector: true # Generate "view" vectors for advanced normals handling (Default=true)
20+
filterOutPointsAtZero: true # Remove invalid points in 'organized' LiDAR scans
2021

2122
# --------------------------------------------------------
2223
# 2) Per local frame filtering

demos/sm2mm_no_decim_imu_mls_keyframe_map.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ generators:
1818
- class_name: mp2p_icp_filters::Generator
1919
params:
2020
name: "generator_default"
21+
filterOutPointsAtZero: true # Remove invalid points in 'organized' LiDAR scans
2122

2223
# This one will just create the layer "localmap", expected by the GICP LIO algorithm for localization
2324
- class_name: mp2p_icp_filters::Generator

demos/sm2mm_pointcloud_voxelize.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
# --------------------------------------------------------
1414
# 1) Generator (observation -> local frame metric maps)
1515
# --------------------------------------------------------
16-
#generators:
17-
# - class_name: mp2p_icp_filters::Generator
18-
# params: ~
16+
generators:
17+
- class_name: mp2p_icp_filters::Generator
18+
params:
19+
filterOutPointsAtZero: true # Remove invalid points in 'organized' LiDAR scans
1920

2021
# --------------------------------------------------------
2122
# 2) Per local frame filtering

demos/sm2mm_pointcloud_voxelize_no_deskew.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
# --------------------------------------------------------
1414
# 1) Generator (observation -> local frame metric maps)
1515
# --------------------------------------------------------
16-
#generators:
17-
# - class_name: mp2p_icp_filters::Generator
18-
# params: ~
16+
generators:
17+
- class_name: mp2p_icp_filters::Generator
18+
params:
19+
filterOutPointsAtZero: true # Remove invalid points in 'organized' LiDAR scans
1920

2021
# --------------------------------------------------------
2122
# 2) Per local frame filtering

demos/sm2mm_voxels_static_dynamic_points.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ generators:
6969
throw_on_unhandled_observation_class: true
7070
process_class_names_regex: "(mrpt::obs::CObservationPointCloud|mrpt::obs::CObservation3DRangeScan|mrpt::obs::CObservation2DRangeScan)"
7171
process_sensor_labels_regex: ".*"
72+
filterOutPointsAtZero: true # Remove invalid points in 'organized' LiDAR scans
7273
metric_map_definition:
7374
# Any class derived from mrpt::maps::CMetricMap https://docs.mrpt.org/reference/latest/group_mrpt_maps_grp.html
7475
class: mrpt::maps::CGenericPointsMap

mp2p_icp_filters/include/mp2p_icp_filters/Generator.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ class Generator : public mrpt::rtti::CObject, // RTTI support
169169
*/
170170
std::string default_pointcloud_class = "mrpt::maps::CGenericPointsMap";
171171

172+
/** When processing mrpt::obs::CObservationPointCloud as inputs, this controls whether
173+
* points with (x,y,z)=(0,0,0) should be discarded as invalid ones; e.g. typical in
174+
* organized clouds from LiDAR sensors.
175+
*/
176+
bool filterOutPointsAtZero = false;
177+
172178
/** If not empty, it will be used instead of class name in Logger and Profiler.
173179
* This is loaded from the `name` key in the YAML configuration block.
174180
*/

0 commit comments

Comments
 (0)