Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
mp2p_icp_filters::Generator Class Reference

#include <Generator.h>

Inheritance diagram for mp2p_icp_filters::Generator:
Inheritance graph
[legend]

Classes

struct  Parameters
 

Public Member Functions

 Generator ()
 
- Public Member Functions inherited from mp2p_icp::Parameterizable
ParameterSourceattachedSource ()
 
const ParameterSourceattachedSource () const
 
virtual void attachToParameterSource (ParameterSource &source)
 
void checkAllParametersAreRealized () const
 
auto & declaredParameters ()
 
const auto & declaredParameters () const
 
void unrealizeParameters ()
 Mark all non-constant parameters as non-evaluated again. More...
 

Protected Member Functions

virtual bool filterPointCloud (const mrpt::maps::CPointsMap &pc, const mrpt::poses::CPose3D &sensorPose, mp2p_icp::metric_map_t &out, const std::optional< mrpt::poses::CPose3D > &robotPose) const
 
virtual bool filterRotatingScan (const mrpt::obs::CObservationRotatingScan &pc, mp2p_icp::metric_map_t &out, const std::optional< mrpt::poses::CPose3D > &robotPose) const
 
virtual bool filterScan2D (const mrpt::obs::CObservation2DRangeScan &pc, mp2p_icp::metric_map_t &out, const std::optional< mrpt::poses::CPose3D > &robotPose) const
 
virtual bool filterScan3D (const mrpt::obs::CObservation3DRangeScan &pc, mp2p_icp::metric_map_t &out, const std::optional< mrpt::poses::CPose3D > &robotPose) const
 
virtual bool filterVelodyneScan (const mrpt::obs::CObservationVelodyneScan &pc, mp2p_icp::metric_map_t &out, const std::optional< mrpt::poses::CPose3D > &robotPose) const
 
- Protected Member Functions inherited from mp2p_icp::Parameterizable
void parseAndDeclareParameter (const std::string &value, double &target)
 
void parseAndDeclareParameter (const std::string &value, float &target)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void parseAndDeclareParameter (const std::string &value, uint32_t &target)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 

Protected Attributes

bool initialized_ = false
 
std::regex process_class_names_regex_
 
std::regex process_sensor_labels_regex_
 

Private Member Functions

bool implProcessCustomMap (const mrpt::obs::CObservation &o, mp2p_icp::metric_map_t &out, const std::optional< mrpt::poses::CPose3D > &robotPose=std::nullopt) const
 
bool implProcessDefault (const mrpt::obs::CObservation &o, mp2p_icp::metric_map_t &out, const std::optional< mrpt::poses::CPose3D > &robotPose=std::nullopt) const
 
void internalLoadUserPlugin (const std::string &moduleToLoad) const
 

Generator API

Parameters params_
 
virtual void initialize (const mrpt::containers::yaml &cfg_block)
 
virtual bool process (const mrpt::obs::CObservation &input_raw, mp2p_icp::metric_map_t &inOut, const std::optional< mrpt::poses::CPose3D > &robotPose=std::nullopt) const
 

Detailed Description

Generic base class providing process(), converting a generic mrpt::obs::CObservation into a metric_map_t with just a point cloud layer (named raw).

This metric_map_t can optionally then be passed through one or more FilterBase implementations to detect features, decimate it, etc.

Specializations of Generator may exist and could be implemented to exploit the structured information in the original CObservation data to be more efficient in detecting features (e.g. corners, etc.).

Internally, different signatures exists for:

Derived classes may implement all or only one of those methods. An exception NotImplementedError will be thrown if an non-implemented method is called.

Note
process() is not required to be thread (multientry) safe.

A set of generators can be loaded from a YAML file and applied together using mp2p_icp_filters::apply_generators().

Definition at line 71 of file Generator.h.

Constructor & Destructor Documentation

◆ Generator()

Generator::Generator ( )

Definition at line 42 of file Generator.cpp.

Member Function Documentation

◆ filterPointCloud()

bool Generator::filterPointCloud ( const mrpt::maps::CPointsMap &  pc,
const mrpt::poses::CPose3D &  sensorPose,
mp2p_icp::metric_map_t out,
const std::optional< mrpt::poses::CPose3D > &  robotPose 
) const
protectedvirtual

Process a 2D/3D point-cloud.

Returns
false if not implemented

Definition at line 206 of file Generator.cpp.

◆ filterRotatingScan()

bool Generator::filterRotatingScan ( const mrpt::obs::CObservationRotatingScan &  pc,
mp2p_icp::metric_map_t out,
const std::optional< mrpt::poses::CPose3D > &  robotPose 
) const
protectedvirtual

Process a 3D lidar scan.

Returns
false if not implemented

Reimplemented in mp2p_icp_filters::GeneratorEdgesFromCurvature, and mp2p_icp_filters::GeneratorEdgesFromRangeImage.

Definition at line 247 of file Generator.cpp.

◆ filterScan2D()

bool Generator::filterScan2D ( const mrpt::obs::CObservation2DRangeScan &  pc,
mp2p_icp::metric_map_t out,
const std::optional< mrpt::poses::CPose3D > &  robotPose 
) const
protectedvirtual

Process a 2D lidar scan.

Returns
false if not implemented

Definition at line 170 of file Generator.cpp.

◆ filterScan3D()

bool Generator::filterScan3D ( const mrpt::obs::CObservation3DRangeScan &  pc,
mp2p_icp::metric_map_t out,
const std::optional< mrpt::poses::CPose3D > &  robotPose 
) const
protectedvirtual

Process a depth camera observation.

Returns
false if not implemented

Reimplemented in mp2p_icp_filters::GeneratorEdgesFromRangeImage.

Definition at line 198 of file Generator.cpp.

◆ filterVelodyneScan()

bool Generator::filterVelodyneScan ( const mrpt::obs::CObservationVelodyneScan &  pc,
mp2p_icp::metric_map_t out,
const std::optional< mrpt::poses::CPose3D > &  robotPose 
) const
protectedvirtual

Process a 3D lidar scan.

Returns
false if not implemented

Definition at line 178 of file Generator.cpp.

◆ implProcessCustomMap()

bool Generator::implProcessCustomMap ( const mrpt::obs::CObservation &  o,
mp2p_icp::metric_map_t out,
const std::optional< mrpt::poses::CPose3D > &  robotPose = std::nullopt 
) const
private

Definition at line 451 of file Generator.cpp.

◆ implProcessDefault()

bool Generator::implProcessDefault ( const mrpt::obs::CObservation &  o,
mp2p_icp::metric_map_t out,
const std::optional< mrpt::poses::CPose3D > &  robotPose = std::nullopt 
) const
private

Definition at line 354 of file Generator.cpp.

◆ initialize()

void Generator::initialize ( const mrpt::containers::yaml &  cfg_block)
virtual

Loads, from a YAML configuration block, all the common, and implementation-specific parameters. If you redefine this method, remember calling this method on the parent class.

Reimplemented in mp2p_icp_filters::GeneratorEdgesFromCurvature, and mp2p_icp_filters::GeneratorEdgesFromRangeImage.

Definition at line 123 of file Generator.cpp.

◆ internalLoadUserPlugin()

void Generator::internalLoadUserPlugin ( const std::string &  moduleToLoad) const
private

Definition at line 606 of file Generator.cpp.

◆ process()

bool Generator::process ( const mrpt::obs::CObservation &  input_raw,
mp2p_icp::metric_map_t inOut,
const std::optional< mrpt::poses::CPose3D > &  robotPose = std::nullopt 
) const
virtual

See docs above for Generator. This method dispatches the observation by type to the corresponding virtual method

Reimplemented in mp2p_icp_filters::GeneratorEdgesFromCurvature.

Definition at line 138 of file Generator.cpp.

Member Data Documentation

◆ initialized_

bool mp2p_icp_filters::Generator::initialized_ = false
protected

Definition at line 179 of file Generator.h.

◆ params_

Parameters mp2p_icp_filters::Generator::params_

Definition at line 147 of file Generator.h.

◆ process_class_names_regex_

std::regex mp2p_icp_filters::Generator::process_class_names_regex_
protected

Definition at line 180 of file Generator.h.

◆ process_sensor_labels_regex_

std::regex mp2p_icp_filters::Generator::process_sensor_labels_regex_
protected

Definition at line 181 of file Generator.h.


The documentation for this class was generated from the following files:


mp2p_icp
Author(s):
autogenerated on Thu Oct 17 2024 02:45:37