Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demos/sm2mm_bonxai_voxelmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ filters:
input_pointcloud_layer: "raw"
output_pointcloud_layer: "deskewed"
#silently_ignore_no_timestamps: true # To handle more dataset types
output_layer_class: "mrpt::maps::CPointsMapXYZIRT" # Keep intensity & ring channels
output_layer_class: "mrpt::maps::CGenericPointsMap" # Keep all channels: intensity, ring, ...

# These (vx,...,wz) are variable names that must be defined via the
# mp2p_icp::Parameterizable API to update them dynamically.
Expand Down
2 changes: 1 addition & 1 deletion demos/sm2mm_bonxai_voxelmap_gridmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ filters:
input_pointcloud_layer: "raw"
output_pointcloud_layer: "deskewed"
#silently_ignore_no_timestamps: true # To handle more dataset types
output_layer_class: "mrpt::maps::CPointsMapXYZIRT" # Keep intensity & ring channels
output_layer_class: "mrpt::maps::CGenericPointsMap" # Keep all channels: intensity, ring, ...
method: MotionCompensationMethod::Linear

# These (vx,...,wz) are variable names that must be defined via the
Expand Down
2 changes: 1 addition & 1 deletion demos/sm2mm_no_decim_imu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ filters:
method: MotionCompensationMethod::IMU
silently_ignore_no_timestamps: false

output_layer_class: "mrpt::maps::CPointsMapXYZIRT" # Keep intensity & ring channels
output_layer_class: "mrpt::maps::CGenericPointsMap" # Keep all channels: intensity, ring, ...

# These (vx,...,wz) are variable names that must be defined via the
# mp2p_icp::Parameterizable API to update them dynamically.
Expand Down
2 changes: 1 addition & 1 deletion demos/sm2mm_no_decim_imu_mls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ filters:
method: MotionCompensationMethod::IMU
silently_ignore_no_timestamps: false

output_layer_class: "mrpt::maps::CPointsMapXYZIRT" # Keep intensity & ring channels
output_layer_class: "mrpt::maps::CGenericPointsMap" # Keep all channels: intensity, ring, ...

# These (vx,...,wz) are variable names that must be defined via the
# mp2p_icp::Parameterizable API to update them dynamically.
Expand Down
2 changes: 1 addition & 1 deletion demos/sm2mm_no_decim_imu_mls_keyframe_map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ filters:
method: MotionCompensationMethod::IMU
silently_ignore_no_timestamps: false

output_layer_class: "mrpt::maps::CPointsMapXYZIRT" # Keep intensity & ring channels
output_layer_class: "mrpt::maps::CGenericPointsMap" # Keep all channels: intensity, ring, ...

# These (vx,...,wz) are variable names that must be defined via the
# mp2p_icp::Parameterizable API to update them dynamically.
Expand Down
2 changes: 1 addition & 1 deletion demos/sm2mm_pointcloud_voxelize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ filters:
output_pointcloud_layer: "deskewed"
method: MotionCompensationMethod::IMU
#silently_ignore_no_timestamps: true # To handle more dataset types
output_layer_class: "mrpt::maps::CPointsMapXYZIRT" # Keep intensity & ring channels
output_layer_class: "mrpt::maps::CGenericPointsMap" # Keep all channels: intensity, ring, ...

# These (vx,...,wz) are variable names that must be defined via the
# mp2p_icp::Parameterizable API to update them dynamically.
Expand Down
2 changes: 1 addition & 1 deletion demos/sm2mm_voxels_static_dynamic_points.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ filters:
input_pointcloud_layer: "raw"
output_pointcloud_layer: "deskewed"
silently_ignore_no_timestamps: true # To handle more dataset types
output_layer_class: "mrpt::maps::CPointsMapXYZIRT" # Keep intensity & ring channels
output_layer_class: "mrpt::maps::CGenericPointsMap" # Keep all channels: intensity, ring, ...

# These (vx,...,wz) are variable names that must be defined via the
# mp2p_icp::Parameterizable API to update them dynamically.
Expand Down
2 changes: 2 additions & 0 deletions mp2p_icp_filters/src/FilterBoundingBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ void FilterBoundingBox::filter(mp2p_icp::metric_map_t& inOut) const
mrpt::maps::CPointsMap::InsertCtx ctxOutside, ctxInside;
if (insidePc)
{
insidePc->registerPointFieldsFrom(pc);
ctxInside = insidePc->prepareForInsertPointsFrom(pc);
}
if (outsidePc)
{
outsidePc->registerPointFieldsFrom(pc);
ctxOutside = outsidePc->prepareForInsertPointsFrom(pc);
}
#endif
Expand Down
3 changes: 3 additions & 0 deletions mp2p_icp_filters/src/FilterByIntensity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,17 @@ void FilterByIntensity::filter(mp2p_icp::metric_map_t& inOut) const
mrpt::maps::CPointsMap::InsertCtx ctxLow, ctxHigh, ctxMid;
if (outLow)
{
outLow->registerPointFieldsFrom(pc);
ctxLow = outLow->prepareForInsertPointsFrom(pc);
}
if (outHigh)
{
outHigh->registerPointFieldsFrom(pc);
ctxHigh = outHigh->prepareForInsertPointsFrom(pc);
}
if (outMid)
{
outMid->registerPointFieldsFrom(pc);
ctxMid = outMid->prepareForInsertPointsFrom(pc);
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions mp2p_icp_filters/src/FilterByRange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ void FilterByRange::filter(mp2p_icp::metric_map_t& inOut) const
std::optional<mrpt::maps::CPointsMap::InsertCtx> ctxOutside;
if (outBetween)
{
outBetween->registerPointFieldsFrom(pc);
ctxBetween = outBetween->prepareForInsertPointsFrom(pc);
}
if (outOutside)
{
outOutside->registerPointFieldsFrom(pc);
ctxOutside = outOutside->prepareForInsertPointsFrom(pc);
}
#endif
Expand Down
9 changes: 7 additions & 2 deletions mp2p_icp_filters/src/FilterByRing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ void FilterByRing::Parameters::load_from_yaml(const mrpt::containers::yaml& c)
"YAML configuration must have an entry `selected_ring_ids` "
"with a scalar or sequence.");

for (const auto& n : cfgIn.asSequenceRange()) selected_ring_ids.insert(n.as<int>());
for (const auto& n : cfgIn.asSequenceRange())
{
selected_ring_ids.insert(n.as<int>());
}
}
ASSERT_(!selected_ring_ids.empty());
}
Expand Down Expand Up @@ -106,7 +109,7 @@ void FilterByRing::filter(mp2p_icp::metric_map_t& inOut) const
const auto& xs = pc.getPointsBufferRef_x();

#if MRPT_VERSION >= 0x020f00 // 2.15.0
const auto* ptrR = pc.getPointsBufferRef_float_field("ring");
const auto* ptrR = pc.getPointsBufferRef_uint_field("ring");
#else
const auto* ptrR = pc.getPointsBufferRef_ring();
#endif
Expand All @@ -123,11 +126,13 @@ void FilterByRing::filter(mp2p_icp::metric_map_t& inOut) const
mrpt::maps::CPointsMap::InsertCtx ctxSelected;
if (outSelected)
{
outSelected->registerPointFieldsFrom(pc);
ctxSelected = outSelected->prepareForInsertPointsFrom(pc);
}
mrpt::maps::CPointsMap::InsertCtx ctxNotSelected;
if (outNonSel)
{
outNonSel->registerPointFieldsFrom(pc);
ctxNotSelected = outNonSel->prepareForInsertPointsFrom(pc);
}
#endif
Expand Down
3 changes: 3 additions & 0 deletions mp2p_icp_filters/src/FilterCurvature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,19 @@ void FilterCurvature::filter(mp2p_icp::metric_map_t& inOut) const
mrpt::maps::CPointsMap::InsertCtx ctxLarger;
if (outPcLarger)
{
outPcLarger->registerPointFieldsFrom(pc);
ctxLarger = outPcLarger->prepareForInsertPointsFrom(pc);
}
mrpt::maps::CPointsMap::InsertCtx ctxSmaller;
if (outPcSmaller)
{
outPcSmaller->registerPointFieldsFrom(pc);
ctxSmaller = outPcSmaller->prepareForInsertPointsFrom(pc);
}
mrpt::maps::CPointsMap::InsertCtx ctxOther;
if (outPcOther)
{
outPcOther->registerPointFieldsFrom(pc);
ctxOther = outPcOther->prepareForInsertPointsFrom(pc);
}
#endif
Expand Down
1 change: 1 addition & 0 deletions mp2p_icp_filters/src/FilterDecimateAdaptive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ void FilterDecimateAdaptive::filter(mp2p_icp::metric_map_t& inOut) const
#endif

#if MRPT_VERSION >= 0x020f00 // 2.15.0
outPc->registerPointFieldsFrom(pc);
mrpt::maps::CPointsMap::InsertCtx ctx = outPc->prepareForInsertPointsFrom(pc);
#endif

Expand Down
3 changes: 3 additions & 0 deletions mp2p_icp_filters/src/FilterDecimateVoxels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ void FilterDecimateVoxels::filter(mp2p_icp::metric_map_t& inOut) const
const auto& ys = pcPtrs[mapIdx]->getPointsBufferRef_y();

#if MRPT_VERSION >= 0x020f00 // 2.15.0
outPc->registerPointFieldsFrom(*pcPtrs[mapIdx]);
mrpt::maps::CPointsMap::InsertCtx ctxOut =
outPc->prepareForInsertPointsFrom(*pcPtrs[mapIdx]);
#endif
Expand Down Expand Up @@ -271,6 +272,7 @@ void FilterDecimateVoxels::filter(mp2p_icp::metric_map_t& inOut) const
auto& ctx = ctxs[pc];
if (!ctx.xs_src)
{
outPc->registerPointFieldsFrom(*pc);
ctx = outPc->prepareForInsertPointsFrom(*pc);
}
#if MRPT_VERSION >= 0x020f03 // 2.15.3
Expand Down Expand Up @@ -315,6 +317,7 @@ void FilterDecimateVoxels::filter(mp2p_icp::metric_map_t& inOut) const
flattenUsedBins;

#if MRPT_VERSION >= 0x020f00 // 2.15.0
outPc->registerPointFieldsFrom(pc);
auto ctx = outPc->prepareForInsertPointsFrom(pc);
#endif

Expand Down
4 changes: 4 additions & 0 deletions mp2p_icp_filters/src/FilterDeskew.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,10 @@ void FilterDeskew::filter(mp2p_icp::metric_map_t& inOut) const
std::optional<mrpt::maps::CPointsMap::InsertCtx> insert_ctx;
if (outPc)
{
// Copy all point fields from the source:
outPc->registerPointFieldsFrom(*inPc);

// and then, prepare structures for fast copying:
insert_ctx = outPc->prepareForInsertPointsFrom(*inPc);
}

Expand Down
1 change: 1 addition & 0 deletions mp2p_icp_filters/src/FilterFartherPointSampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void FilterFartherPointSampling::filter(mp2p_icp::metric_map_t& inOut) const
outPc->reserve(outPc->size() + params.desired_output_point_count);

#if MRPT_VERSION >= 0x020f00 // 2.15.0
outPc->registerPointFieldsFrom(pc);
mrpt::maps::CPointsMap::InsertCtx ctx = outPc->prepareForInsertPointsFrom(pc);
#endif

Expand Down
2 changes: 2 additions & 0 deletions mp2p_icp_filters/src/FilterPoleDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,13 @@ void FilterPoleDetector::filter(mp2p_icp::metric_map_t& inOut) const
mrpt::maps::CPointsMap::InsertCtx ctxPoles;
if (outPoles)
{
outPoles->registerPointFieldsFrom(pc);
ctxPoles = outPoles->prepareForInsertPointsFrom(pc);
}
mrpt::maps::CPointsMap::InsertCtx ctxNoPoles;
if (outNoPoles)
{
outNoPoles->registerPointFieldsFrom(pc);
ctxNoPoles = outNoPoles->prepareForInsertPointsFrom(pc);
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions mp2p_icp_filters/src/FilterRemoveByVoxelOccupancy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ void FilterRemoveByVoxelOccupancy::filter(mp2p_icp::metric_map_t& inOut) const
mrpt::maps::CPointsMap::InsertCtx ctxStatic;
if (outPcStatic)
{
outPcStatic->registerPointFieldsFrom(*pcPtr);
ctxStatic = outPcStatic->prepareForInsertPointsFrom(*pcPtr);
}
mrpt::maps::CPointsMap::InsertCtx ctxDynamic;
if (outPcDynamic)
{
outPcDynamic->registerPointFieldsFrom(*pcPtr);
ctxDynamic = outPcDynamic->prepareForInsertPointsFrom(*pcPtr);
}
#endif
Expand Down
Loading