MRPT
2.0.1
|
CRandomFieldGridMap3D represents a 3D regular grid where each voxel is associated one real-valued property which is to be estimated by this class.
This class implements a Gaussian Markov Random Field (GMRF) estimator, with each voxel being connected to its 6 immediate neighbors (Up, down, left, right, front, back).
Note that this class does not derive from mrpt::maps::CMetricMap since the estimated values do not have sensor-especific semantics, i.e. the grid can be used to estimate temperature, gas concentration, etc.
Usage:
setSize()
.initialize()
. This resets the contents of the map, so previously-added observations will be lost.insertIndividualReading()
Custom connectivity patterns can be defined with setVoxelsConnectivity().
Definition at line 72 of file CRandomFieldGridMap3D.h.
#include <mrpt/maps/CRandomFieldGridMap3D.h>
Classes | |
struct | ConnectivityDescriptor |
Base class for user-supplied objects capable of describing voxels connectivity, used to build prior factors of the MRF graph. More... | |
struct | TInsertionOptions |
Parameters common to any derived class. More... | |
struct | TObservationGMRF |
struct | TPriorFactorGMRF |
Public Types | |
enum | TVoxelInterpolationMethod { gimNearest = 0, gimBilinear } |
using | grid_data_t = std::vector< TRandomFieldVoxel > |
using | iterator = typename grid_data_t::iterator |
using | const_iterator = typename grid_data_t::const_iterator |
Public Member Functions | |
CRandomFieldGridMap3D (double x_min=-2, double x_max=2, double y_min=-2, double y_max=2, double z_min=-2, double z_max=2, double voxel_size=0.5, bool call_initialize_now=true) | |
Constructor. More... | |
void | clear () override |
Erases all added observations and start again with an empty gridmap. More... | |
bool | saveAsCSV (const std::string &filName_mean, const std::string &filName_stddev=std::string()) const |
Save the current estimated mean values to a CSV file (compatible with Paraview) with fields x y z mean_value . More... | |
void | resize (double new_x_min, double new_x_max, double new_y_min, double new_y_max, double new_z_min, double new_z_max, const TRandomFieldVoxel &defaultValueNewvoxels, double additionalMarginMeters=2.0) override |
Changes the size of the grid, maintaining previous contents. More... | |
void | setSize (const double x_min, const double x_max, const double y_min, const double y_max, const double z_min, const double z_max, const double resolution_xy, const double resolution_z=-1.0, const TRandomFieldVoxel *fill_value=nullptr) override |
Changes the size of the grid, erasing previous contents.If resolution_z <0, the same resolution will be used for all dimensions x,y,z as given in resolution_xy More... | |
void | setVoxelsConnectivity (const ConnectivityDescriptor::Ptr &new_connectivity_descriptor) |
Sets a custom object to define the connectivity between voxels. More... | |
bool | insertIndividualReading (const double sensorReading, const double sensorVariance, const mrpt::math::TPoint3D &point, const TVoxelInterpolationMethod method, const bool update_map) |
Direct update of the map with a reading in a given position of the map. More... | |
void | updateMapEstimation () |
Run the method-specific procedure required to ensure that the mean & variances are up-to-date with all inserted observations, using parameters in insertionOptions. More... | |
virtual void | resize (double new_x_min, double new_x_max, double new_y_min, double new_y_max, double new_z_min, double new_z_max, const TRandomFieldVoxel &defaultValueNewCells, double additionalMarginMeters=2) |
Changes the size of the grid, maintaining previous contents. More... | |
virtual void | setSize (const double x_min, const double x_max, const double y_min, const double y_max, const double z_min, const double z_max, const double resolution_xy, const double resolution_z_=-1.0, const TRandomFieldVoxel *fill_value=nullptr) |
Changes the size of the grid, ERASING all previous contents. More... | |
void | fill (const TRandomFieldVoxel &value) |
Fills all the cells with the same value. More... | |
bool | isOutOfBounds (const int cx, const int cy, const int cz) const |
size_t | cellAbsIndexFromCXCYCZ (const int cx, const int cy, const int cz) const |
Gets the absolute index of a voxel in the linear container m_map[] from its cx,cy,cz indices, or -1 if out of map bounds (in any dimension). More... | |
TRandomFieldVoxel * | cellByPos (double x, double y, double z) |
Returns a pointer to the contents of a voxel given by its coordinates, or nullptr if it is out of the map extensions. More... | |
const TRandomFieldVoxel * | cellByPos (double x, double y, double z) const |
TRandomFieldVoxel & | cellRefByPos (double x, double y, double z) |
Like cellByPos() but returns a reference. More... | |
const TRandomFieldVoxel & | cellRefByPos (double x, double y, double z) const |
TRandomFieldVoxel * | cellByIndex (unsigned int cx, unsigned int cy, unsigned int cz) |
Returns a pointer to the contents of a voxel given by its voxel indexes, or nullptr if it is out of the map extensions. More... | |
const TRandomFieldVoxel * | cellByIndex (unsigned int cx, unsigned int cy, unsigned int cz) const |
const TRandomFieldVoxel * | cellByIndex (size_t cidx) const |
Returns a pointer to the contents of a voxel given by its absolute voxel index, or nullptr if it is out of range. More... | |
TRandomFieldVoxel * | cellByIndex (size_t cidx) |
size_t | getSizeX () const |
size_t | getSizeY () const |
size_t | getSizeZ () const |
size_t | getVoxelCount () const |
double | getXMin () const |
double | getXMax () const |
double | getYMin () const |
double | getYMax () const |
double | getZMin () const |
double | getZMax () const |
double | getResolutionXY () const |
double | getResolutionZ () const |
int | x2idx (double x) const |
Transform a coordinate values into voxel indexes. More... | |
int | y2idx (double y) const |
int | z2idx (double z) const |
double | idx2x (int cx) const |
Transform a voxel index into a coordinate value of the voxel central point. More... | |
double | idx2y (int cy) const |
double | idx2z (int cz) const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
void | dyngridcommon_writeToStream (ARCHIVE &out) const |
Serialization of all parameters, except the contents of each voxel (responsability of the derived class) More... | |
void | dyngridcommon_readFromStream (ARCHIVE &in) |
Serialization of all parameters, except the contents of each voxel (responsability of the derived class) More... | |
virtual mxArray * | writeToMatlab () const |
Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More... | |
RTTI classes and functions for polymorphic hierarchies | |
mrpt::rtti::CObject::Ptr | duplicateGetSmartPtr () const |
Makes a deep copy of the object and returns a smart pointer to it. More... | |
Static Public Member Functions | |
static std::array< mrpt::system::TConsoleColor, NUMBER_OF_VERBOSITY_LEVELS > & | logging_levels_to_colors () |
Map from VerbosityLevels to their corresponding mrpt::system::TConsoleColor. More... | |
static std::array< std::string, NUMBER_OF_VERBOSITY_LEVELS > & | logging_levels_to_names () |
Map from VerbosityLevels to their corresponding names. More... | |
Public Attributes | |
TInsertionOptions | insertionOptions |
Static Public Attributes | |
static bool | ENABLE_GMRF_PROFILER |
[default:false] Enables a profiler to show a performance report at application end. More... | |
static const size_t | INVALID_VOXEL_IDX |
Protected Member Functions | |
void | internal_initialize (bool erase_prev_contents=true) |
Internal: called called after each change of resolution, size, etc. More... | |
std::vector< TRandomFieldVoxel > & | m_map_castaway_const () const |
Used only from logically const method that really need to modify the object. More... | |
CSerializable virtual methods | |
uint8_t | serializeGetVersion () const override |
Must return the current versioning number of the object. More... | |
void | serializeTo (mrpt::serialization::CArchive &out) const override |
Pure virtual method for writing (serializing) to an abstract archive. More... | |
void | serializeFrom (mrpt::serialization::CArchive &in, uint8_t serial_version) override |
Pure virtual method for reading (deserializing) from an abstract archive. More... | |
CSerializable virtual methods | |
virtual void | serializeTo (CSchemeArchiveBase &out) const |
Virtual method for writing (serializing) to an abstract schema based archive. More... | |
virtual void | serializeFrom (CSchemeArchiveBase &in) |
Virtual method for reading (deserializing) from an abstract schema based archive. More... | |
Protected Attributes | |
ConnectivityDescriptor::Ptr | m_gmrf_connectivity |
Empty: default. More... | |
mrpt::graphs::ScalarFactorGraph | m_gmrf |
std::vector< std::deque< TObservationGMRF > > | m_mrf_factors_activeObs |
Vector with the active observations and their respective Information, for each map cell. More... | |
std::deque< TPriorFactorGMRF > | m_mrf_factors_priors |
Vector with the precomputed priors for each GMRF model. More... | |
grid_data_t | m_map |
The cells. More... | |
double | m_x_min |
double | m_x_max |
double | m_y_min |
double | m_y_max |
double | m_z_min |
double | m_z_max |
double | m_resolution_xy |
double | m_resolution_z |
size_t | m_size_x |
size_t | m_size_y |
size_t | m_size_z |
size_t | m_size_x_times_y |
VerbosityLevel | m_min_verbosity_level {LVL_INFO} |
Provided messages with VerbosityLevel smaller than this value shall be ignored. More... | |
Private Types | |
using | BASE = mrpt::containers::CDynamicGrid3D< TRandomFieldVoxel > |
RTTI stuff | |
using | Ptr = std::shared_ptr< mrpt::maps ::CRandomFieldGridMap3D > |
using | ConstPtr = std::shared_ptr< const mrpt::maps ::CRandomFieldGridMap3D > |
using | UniquePtr = std::unique_ptr< mrpt::maps ::CRandomFieldGridMap3D > |
using | ConstUniquePtr = std::unique_ptr< const mrpt::maps ::CRandomFieldGridMap3D > |
static const mrpt::rtti::TRuntimeClassId | runtimeClassId |
static constexpr const char * | className = "mrpt::maps" "::" "CRandomFieldGridMap3D" |
static const mrpt::rtti::TRuntimeClassId * | _GetBaseClass () |
static constexpr auto | getClassName () |
static const mrpt::rtti::TRuntimeClassId & | GetRuntimeClassIdStatic () |
static std::shared_ptr< CObject > | CreateObject () |
template<typename... Args> | |
static Ptr | Create (Args &&... args) |
template<typename Alloc , typename... Args> | |
static Ptr | CreateAlloc (const Alloc &alloc, Args &&... args) |
template<typename... Args> | |
static UniquePtr | CreateUnique (Args &&... args) |
virtual const mrpt::rtti::TRuntimeClassId * | GetRuntimeClass () const override |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::rtti::CObject * | clone () const override |
Returns a deep copy (clone) of the object, indepently of its class. More... | |
Logging methods | |
bool | logging_enable_console_output {true} |
[Default=true] Set it to false in case you don't want the logged messages to be dumped to the output automatically. More... | |
bool | logging_enable_keep_record {false} |
[Default=false] Enables storing all messages into an internal list. More... | |
void | logStr (const VerbosityLevel level, std::string_view msg_str) const |
Main method to add the specified message string to the logger. More... | |
void | logFmt (const VerbosityLevel level, const char *fmt,...) const MRPT_printf_format_check(3 |
Alternative logging method, which mimics the printf behavior. More... | |
void void | logCond (const VerbosityLevel level, bool cond, const std::string &msg_str) const |
Log the given message only if the condition is satisfied. More... | |
void | setLoggerName (const std::string &name) |
Set the name of the COutputLogger instance. More... | |
std::string | getLoggerName () const |
Return the name of the COutputLogger instance. More... | |
void | setMinLoggingLevel (const VerbosityLevel level) |
Set the minimum logging level for which the incoming logs are going to be taken into account. More... | |
void | setVerbosityLevel (const VerbosityLevel level) |
alias of setMinLoggingLevel() More... | |
VerbosityLevel | getMinLoggingLevel () const |
bool | isLoggingLevelVisible (VerbosityLevel level) const |
void | getLogAsString (std::string &log_contents) const |
Fill the provided string with the contents of the logger's history in std::string representation. More... | |
std::string | getLogAsString () const |
Get the history of COutputLogger instance in a string representation. More... | |
void | writeLogToFile (const std::string *fname_in=nullptr) const |
Write the contents of the COutputLogger instance to an external file. More... | |
void | dumpLogToConsole () const |
Dump the current contents of the COutputLogger instance in the terminal window. More... | |
std::string | getLoggerLastMsg () const |
Return the last Tmsg instance registered in the logger history. More... | |
void | getLoggerLastMsg (std::string &msg_str) const |
Fill inputtted string with the contents of the last message in history. More... | |
void | loggerReset () |
Reset the contents of the logger instance. More... | |
void | logRegisterCallback (output_logger_callback_t userFunc) |
bool | logDeregisterCallback (output_logger_callback_t userFunc) |
|
private |
Definition at line 77 of file CRandomFieldGridMap3D.h.
|
inherited |
Definition at line 31 of file CDynamicGrid3D.h.
using mrpt::maps::CRandomFieldGridMap3D::ConstPtr = std::shared_ptr<const mrpt::maps :: CRandomFieldGridMap3D > |
Definition at line 79 of file CRandomFieldGridMap3D.h.
using mrpt::maps::CRandomFieldGridMap3D::ConstUniquePtr = std::unique_ptr<const mrpt::maps :: CRandomFieldGridMap3D > |
Definition at line 79 of file CRandomFieldGridMap3D.h.
|
inherited |
Definition at line 29 of file CDynamicGrid3D.h.
|
inherited |
Definition at line 30 of file CDynamicGrid3D.h.
using mrpt::maps::CRandomFieldGridMap3D::Ptr = std::shared_ptr< mrpt::maps :: CRandomFieldGridMap3D > |
A type for the associated smart pointer
Definition at line 79 of file CRandomFieldGridMap3D.h.
using mrpt::maps::CRandomFieldGridMap3D::UniquePtr = std::unique_ptr< mrpt::maps :: CRandomFieldGridMap3D > |
Definition at line 79 of file CRandomFieldGridMap3D.h.
Enumerator | |
---|---|
gimNearest | |
gimBilinear |
Definition at line 191 of file CRandomFieldGridMap3D.h.
CRandomFieldGridMap3D::CRandomFieldGridMap3D | ( | double | x_min = -2 , |
double | x_max = 2 , |
||
double | y_min = -2 , |
||
double | y_max = 2 , |
||
double | z_min = -2 , |
||
double | z_max = 2 , |
||
double | voxel_size = 0.5 , |
||
bool | call_initialize_now = true |
||
) |
Constructor.
If you set call_initialize_now to false, the object will be initialized immediately (without the heavy initialization of the GMRF), but you then must call setSize()
or clear()
later to properly initialize the object before using it to insert observations.
Definition at line 29 of file CRandomFieldGridMap3D.cpp.
|
staticprotected |
|
inlineinherited |
Definition at line 352 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 354 of file CDynamicGrid3D.h.
|
inlineinherited |
Gets the absolute index of a voxel in the linear container m_map[] from its cx,cy,cz indices, or -1 if out of map bounds (in any dimension).
Definition at line 240 of file CDynamicGrid3D.h.
|
inlineinherited |
Returns a pointer to the contents of a voxel given by its voxel indexes, or nullptr if it is out of the map extensions.
Definition at line 285 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 291 of file CDynamicGrid3D.h.
|
inlineinherited |
Returns a pointer to the contents of a voxel given by its absolute voxel index, or nullptr if it is out of range.
Definition at line 302 of file CDynamicGrid3D.h.
|
inlineinherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 308 of file CDynamicGrid3D.h.
|
inlineinherited |
Returns a pointer to the contents of a voxel given by its coordinates, or nullptr if it is out of the map extensions.
Definition at line 250 of file CDynamicGrid3D.h.
|
inlineinherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 258 of file CDynamicGrid3D.h.
|
inlineinherited |
Like cellByPos() but returns a reference.
std::out_of_range | if out of grid limits. |
Definition at line 268 of file CDynamicGrid3D.h.
|
inlineinherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 275 of file CDynamicGrid3D.h.
|
overridevirtual |
Erases all added observations and start again with an empty gridmap.
Reimplemented from mrpt::containers::CDynamicGrid3D< TRandomFieldVoxel >.
Definition at line 73 of file CRandomFieldGridMap3D.cpp.
References mrpt::containers::CDynamicGrid3D< T, coord_t >::clear().
|
overridevirtual |
Returns a deep copy (clone) of the object, indepently of its class.
Implements mrpt::rtti::CObject.
|
inlinestatic |
Definition at line 79 of file CRandomFieldGridMap3D.h.
|
inlinestatic |
Definition at line 79 of file CRandomFieldGridMap3D.h.
|
static |
|
inlinestatic |
Definition at line 79 of file CRandomFieldGridMap3D.h.
|
inherited |
Dump the current contents of the COutputLogger instance in the terminal window.
Definition at line 190 of file COutputLogger.cpp.
|
inlineinherited |
Makes a deep copy of the object and returns a smart pointer to it.
Definition at line 204 of file CObject.h.
References mrpt::rtti::CObject::clone().
Referenced by mrpt::obs::CRawlog::insert().
|
inlineinherited |
Serialization of all parameters, except the contents of each voxel (responsability of the derived class)
Definition at line 382 of file CDynamicGrid3D.h.
|
inlineinherited |
Serialization of all parameters, except the contents of each voxel (responsability of the derived class)
Definition at line 371 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 353 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 355 of file CDynamicGrid3D.h.
|
inlineinherited |
Fills all the cells with the same value.
Definition at line 223 of file CDynamicGrid3D.h.
|
inlinestatic |
Definition at line 79 of file CRandomFieldGridMap3D.h.
|
inherited |
Fill the provided string with the contents of the logger's history in std::string representation.
Definition at line 154 of file COutputLogger.cpp.
|
inherited |
Get the history of COutputLogger instance in a string representation.
Definition at line 159 of file COutputLogger.cpp.
Referenced by mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::getDescriptiveReport().
|
inherited |
Return the last Tmsg instance registered in the logger history.
Definition at line 195 of file COutputLogger.cpp.
References mrpt::system::COutputLogger::TMsg::getAsString().
|
inherited |
Fill inputtted string with the contents of the last message in history.
Definition at line 201 of file COutputLogger.cpp.
|
inherited |
Return the name of the COutputLogger instance.
Definition at line 143 of file COutputLogger.cpp.
|
inlineinherited |
Definition at line 201 of file system/COutputLogger.h.
References mrpt::system::COutputLogger::m_min_verbosity_level.
Referenced by mrpt::apps::RawlogGrabberApp::dump_verbose_info(), mrpt::maps::CRandomFieldGridMap2D::isEnabledVerbose(), mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), mrpt::apps::CGridMapAlignerApp::run(), mrpt::apps::RBPF_SLAM_App_Base::run(), and mrpt::apps::ICP_SLAM_App_Base::run().
|
inlineinherited |
Definition at line 324 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 325 of file CDynamicGrid3D.h.
|
overridevirtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::serialization::CSerializable.
|
static |
|
inlineinherited |
Definition at line 314 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 315 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 316 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 317 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 319 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 318 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 321 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 320 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 323 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 322 of file CDynamicGrid3D.h.
|
inlineinherited |
Transform a voxel index into a coordinate value of the voxel central point.
Definition at line 342 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 346 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 350 of file CDynamicGrid3D.h.
bool CRandomFieldGridMap3D::insertIndividualReading | ( | const double | sensorReading, |
const double | sensorVariance, | ||
const mrpt::math::TPoint3D & | point, | ||
const TVoxelInterpolationMethod | method, | ||
const bool | update_map | ||
) |
Direct update of the map with a reading in a given position of the map.
[in] | sensorReading | The value observed in the (x,y,z) position |
[in] | sensorVariance | The variance of the sensor observation |
[in] | point | The (x,y,z) location |
[in] | method | Voxel interpolation method: how many voxels will be affected by the reading |
[in] | update_map | Run a global map update after inserting this observation (algorithm-dependant) |
Definition at line 294 of file CRandomFieldGridMap3D.cpp.
References ASSERT_ABOVE_, ASSERTMSG_, mrpt::maps::CRandomFieldGridMap3D::TObservationGMRF::Lambda, MRPT_END, MRPT_START, mrpt::graphs::ScalarFactorGraph::UnaryFactorVirtualBase::node_id, mrpt::maps::CRandomFieldGridMap3D::TObservationGMRF::obsValue, mrpt::math::TPoint3D_data< T >::x, mrpt::math::TPoint3D_data< T >::y, and mrpt::math::TPoint3D_data< T >::z.
Referenced by TEST().
|
protected |
Internal: called called after each change of resolution, size, etc.
to build the prior factor information
Definition at line 79 of file CRandomFieldGridMap3D.cpp.
References ASSERT_, ASSERT_EQUAL_, dir, mrpt::maps::CRandomFieldGridMap3D::ConnectivityDescriptor::getEdgeInformation(), mrpt::maps::CRandomFieldGridMap3D::TPriorFactorGMRF::Lambda, MRPT_LOG_DEBUG_STREAM, mrpt::graphs::ScalarFactorGraph::BinaryFactorVirtualBase::node_id_i, mrpt::graphs::ScalarFactorGraph::BinaryFactorVirtualBase::node_id_j, mrpt::system::CTicTac::Tac(), and mrpt::system::CTicTac::Tic().
|
inlineinherited |
Definition at line 202 of file system/COutputLogger.h.
References mrpt::system::COutputLogger::m_min_verbosity_level.
Referenced by mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), and mrpt::system::COutputLoggerStreamWrapper::~COutputLoggerStreamWrapper().
|
inlineinherited |
Definition at line 230 of file CDynamicGrid3D.h.
|
inherited |
Log the given message only if the condition is satisfied.
Definition at line 131 of file COutputLogger.cpp.
|
inherited |
Definition at line 291 of file COutputLogger.cpp.
References getAddress(), and mrpt::system::COutputLogger::m_listCallbacks.
|
inherited |
Alternative logging method, which mimics the printf behavior.
Handy for not having to first use mrpt::format to pass a std::string message to logStr
Definition at line 91 of file COutputLogger.cpp.
Referenced by mrpt::hmtslam::CHMTSLAM::areaAbstraction(), mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::CICPCriteriaNRD(), mrpt::hmtslam::CTopLCDetector_GridMatching::computeTopologicalObservationModel(), CGraphSlamHandler< GRAPH_T >::execute(), mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), CGraphSlamHandler< GRAPH_T >::initOutputDir(), CGraphSlamHandler< GRAPH_T >::initVisualization(), mrpt::nav::CNavigatorManualSequence::navigationStep(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), CGraphSlamHandler< GRAPH_T >::readConfigFname(), CGraphSlamHandler< GRAPH_T >::saveResults(), CGraphSlamHandler< GRAPH_T >::setResultsDirName(), mrpt::nav::CReactiveNavigationSystem::STEP1_InitPTGs(), mrpt::hmtslam::CHMTSLAM::thread_3D_viewer(), mrpt::hmtslam::CHMTSLAM::thread_LSLAM(), mrpt::hmtslam::CHMTSLAM::thread_TBI(), and CGraphSlamHandler< GRAPH_T >::~CGraphSlamHandler().
|
inherited |
Reset the contents of the logger instance.
Called upon construction.
Definition at line 206 of file COutputLogger.cpp.
References mrpt::system::LVL_INFO.
|
staticinherited |
Map from VerbosityLevels to their corresponding mrpt::system::TConsoleColor.
Handy for coloring the input based on the verbosity of the message
Definition at line 47 of file COutputLogger.cpp.
References logging_levels_to_colors.
Referenced by mrpt::system::COutputLogger::TMsg::dumpToConsole().
|
staticinherited |
Map from VerbosityLevels to their corresponding names.
Handy for printing the current message VerbosityLevel along with the actual content
Definition at line 60 of file COutputLogger.cpp.
References logging_levels_to_names.
Referenced by mrpt::system::COutputLogger::TMsg::getAsString().
|
inherited |
Definition at line 278 of file COutputLogger.cpp.
References mrpt::system::COutputLogger::m_listCallbacks.
|
inherited |
Main method to add the specified message string to the logger.
Definition at line 72 of file COutputLogger.cpp.
References mrpt::system::COutputLogger::TMsg::body, mrpt::system::COutputLogger::TMsg::dumpToConsole(), mrpt::system::COutputLogger::TMsg::level, mrpt::system::COutputLogger::TMsg::name, and mrpt::system::COutputLogger::TMsg::timestamp.
Referenced by mrpt::slam::PF_implementation< mrpt::math::TPose3D, CMonteCarloLocalization3D, mrpt::bayes::particle_storage_mode::VALUE >::PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal(), mrpt::nav::CReactiveNavigationSystem::STEP1_InitPTGs(), mrpt::system::COutputLoggerStreamWrapper::~COutputLoggerStreamWrapper(), and mrpt::system::CTimeLoggerSaveAtDtor::~CTimeLoggerSaveAtDtor().
|
inlineprotectedinherited |
Used only from logically const method that really need to modify the object.
Definition at line 362 of file CDynamicGrid3D.h.
|
inlinevirtualinherited |
Changes the size of the grid, maintaining previous contents.
Definition at line 48 of file CDynamicGrid3D.h.
|
override |
Changes the size of the grid, maintaining previous contents.
Definition at line 57 of file CRandomFieldGridMap3D.cpp.
References MRPT_END, MRPT_START, and resize().
Referenced by TEST().
bool mrpt::maps::CRandomFieldGridMap3D::saveAsCSV | ( | const std::string & | filName_mean, |
const std::string & | filName_stddev = std::string() |
||
) | const |
Save the current estimated mean values to a CSV file (compatible with Paraview) with fields x y z mean_value
.
Optionally, std deviations can be also saved to another file with fields x y z stddev_value
, if filName_stddev
is provided.
Definition at line 208 of file CRandomFieldGridMap3D.cpp.
References mrpt::format().
Referenced by TEST().
|
inlineprotectedvirtualinherited |
Virtual method for reading (deserializing) from an abstract schema based archive.
Definition at line 74 of file CSerializable.h.
References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.
|
overrideprotectedvirtual |
Pure virtual method for reading (deserializing) from an abstract archive.
Users don't call this method directly. Instead, use stream >> object;
.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 362 of file CRandomFieldGridMap3D.cpp.
References ASSERT_EQUAL_, MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION, and mrpt::serialization::CArchive::ReadBuffer().
|
overrideprotectedvirtual |
Must return the current versioning number of the object.
Start in zero for new classes, and increments each time there is a change in the stored format.
Implements mrpt::serialization::CSerializable.
Definition at line 335 of file CRandomFieldGridMap3D.cpp.
|
inlineprotectedvirtualinherited |
Virtual method for writing (serializing) to an abstract schema based archive.
Definition at line 64 of file CSerializable.h.
References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.
|
overrideprotectedvirtual |
Pure virtual method for writing (serializing) to an abstract archive.
Users don't call this method directly. Instead, use stream << object;
.
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 336 of file CRandomFieldGridMap3D.cpp.
References out.
|
inherited |
Set the name of the COutputLogger instance.
Definition at line 138 of file COutputLogger.cpp.
Referenced by mrpt::slam::CMetricMapBuilderICP::CMetricMapBuilderICP(), mrpt::slam::CMetricMapBuilderRBPF::CMetricMapBuilderRBPF(), mrpt::slam::CMonteCarloLocalization2D::CMonteCarloLocalization2D(), mrpt::slam::CMonteCarloLocalization3D::CMonteCarloLocalization3D(), mrpt::apps::ICP_SLAM_App_Base::ICP_SLAM_App_Base(), mrpt::apps::ICP_SLAM_App_Live::ICP_SLAM_App_Live(), mrpt::apps::ICP_SLAM_App_Rawlog::ICP_SLAM_App_Rawlog(), mrpt::graphslam::CWindowManager::initCWindowManager(), mrpt::apps::MonteCarloLocalization_Base::MonteCarloLocalization_Base(), mrpt::apps::RBPF_SLAM_App_Base::RBPF_SLAM_App_Base(), and mrpt::apps::RBPF_SLAM_App_Rawlog::RBPF_SLAM_App_Rawlog().
|
inherited |
Set the minimum logging level for which the incoming logs are going to be taken into account.
String messages with specified VerbosityLevel smaller than the min, will not be outputted to the screen and neither will a record of them be stored in by the COutputLogger instance
Definition at line 144 of file COutputLogger.cpp.
Referenced by mrpt::maps::CRandomFieldGridMap2D::enableVerbose(), mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), generic_kf_slam_test(), generic_pf_test(), generic_rbpf_slam_test(), mrpt::apps::RawlogGrabberApp::initialize(), mrpt::hwdrivers::CHokuyoURG::initialize(), mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::loadParams(), mrpt::apps::CGridMapAlignerApp::run(), mrpt::apps::RBPF_SLAM_App_Base::run(), and mrpt::apps::ICP_SLAM_App_Base::run().
|
override |
Changes the size of the grid, erasing previous contents.If resolution_z
<0, the same resolution will be used for all dimensions x,y,z as given in resolution_xy
Changes the size of the grid, erasing previous contents.
Definition at line 41 of file CRandomFieldGridMap3D.cpp.
References MRPT_END, MRPT_START, and mrpt::containers::CDynamicGrid3D< TRandomFieldVoxel >::setSize().
Referenced by TEST().
|
inlinevirtualinherited |
Changes the size of the grid, ERASING all previous contents.
If fill_value is left as nullptr, the contents of cells may be undefined (some will remain with their old values, the new ones will have the default voxel value, but the location of old values may change wrt their old places). If fill_value is not nullptr, it is assured that all cells will have a copy of that value after resizing. If resolution_z
<0, the same resolution will be used for all dimensions x,y,z as given in resolution_xy
Definition at line 175 of file CDynamicGrid3D.h.
Referenced by setSize().
|
inherited |
alias of setMinLoggingLevel()
Definition at line 149 of file COutputLogger.cpp.
Referenced by mrpt::nav::CAbstractNavigator::CAbstractNavigator(), mrpt::slam::CMetricMapBuilderRBPF::CMetricMapBuilderRBPF(), mrpt::comms::CServerTCPSocket::CServerTCPSocket(), mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), mrpt::math::ransac_detect_2D_lines(), and mrpt::apps::ICP_SLAM_App_Base::run().
void mrpt::maps::CRandomFieldGridMap3D::setVoxelsConnectivity | ( | const ConnectivityDescriptor::Ptr & | new_connectivity_descriptor | ) |
Sets a custom object to define the connectivity between voxels.
Must call clear() or setSize() afterwards for the changes to take place.
Definition at line 288 of file CRandomFieldGridMap3D.cpp.
void CRandomFieldGridMap3D::updateMapEstimation | ( | ) |
Run the method-specific procedure required to ensure that the mean & variances are up-to-date with all inserted observations, using parameters in insertionOptions.
Definition at line 264 of file CRandomFieldGridMap3D.cpp.
References ASSERT_, and ASSERTMSG_.
Referenced by TEST().
|
inherited |
Write the contents of the COutputLogger instance to an external file.
Upon call to this method, COutputLogger dumps the contents of all the logged commands so far to the specified external file. By default the filename is set to ${LOGGERNAME}.log except if the fname parameter is provided
Definition at line 165 of file COutputLogger.cpp.
References ASSERTMSG_, and mrpt::format().
|
inlinevirtualinherited |
Introduces a pure virtual method responsible for writing to a mxArray
Matlab object, typically a MATLAB struct
whose contents are documented in each derived class.
mxArray
(caller is responsible of memory freeing) or nullptr is class does not support conversion to MATLAB. Definition at line 90 of file CSerializable.h.
|
inlineinherited |
Transform a coordinate values into voxel indexes.
Definition at line 327 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 331 of file CDynamicGrid3D.h.
|
inlineinherited |
Definition at line 335 of file CDynamicGrid3D.h.
|
static |
Definition at line 79 of file CRandomFieldGridMap3D.h.
|
static |
[default:false] Enables a profiler to show a performance report at application end.
Definition at line 83 of file CRandomFieldGridMap3D.h.
TInsertionOptions mrpt::maps::CRandomFieldGridMap3D::insertionOptions |
Definition at line 141 of file CRandomFieldGridMap3D.h.
Referenced by TEST().
|
staticinherited |
Definition at line 228 of file CDynamicGrid3D.h.
|
inherited |
[Default=true] Set it to false in case you don't want the logged messages to be dumped to the output automatically.
Definition at line 240 of file system/COutputLogger.h.
|
inherited |
[Default=false] Enables storing all messages into an internal list.
Definition at line 243 of file system/COutputLogger.h.
|
protected |
Definition at line 227 of file CRandomFieldGridMap3D.h.
|
protected |
Empty: default.
Definition at line 225 of file CRandomFieldGridMap3D.h.
|
mutableprotectedinherited |
The cells.
Definition at line 359 of file CDynamicGrid3D.h.
|
protectedinherited |
Provided messages with VerbosityLevel smaller than this value shall be ignored.
Definition at line 253 of file system/COutputLogger.h.
Referenced by mrpt::system::COutputLogger::getMinLoggingLevel(), and mrpt::system::COutputLogger::isLoggingLevelVisible().
|
protected |
Vector with the active observations and their respective Information, for each map cell.
Definition at line 271 of file CRandomFieldGridMap3D.h.
|
protected |
Vector with the precomputed priors for each GMRF model.
Definition at line 273 of file CRandomFieldGridMap3D.h.
|
protectedinherited |
Definition at line 363 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 363 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 365 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 365 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 365 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 365 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 363 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 363 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 363 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 363 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 363 of file CDynamicGrid3D.h.
|
protectedinherited |
Definition at line 363 of file CDynamicGrid3D.h.
|
staticprotected |
Definition at line 79 of file CRandomFieldGridMap3D.h.
Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020 |