Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Functions
[mrpt-base]

Detailed Description

Back to list of all libraries | See all modules

mrpt-base: Obsolete in MRPT 2.0.0!

In MRPT 2.0, mrpt-base has been split into many smaller libraries for the sake of modularity of easy of code reusability.

TODO: Move these comments to separate lib_*.h files

A comprehensive collection of geometry-related classes to represent all kind of 2D and 3D geomtry transformations in different formats (Euler angles, rotation matrices, quaternions), as well as networks of pose constrains (as used typically in SLAM problems).

There are also implemented representations for probability distributions over all of these transformations, in a generic way that allow mono and multi-modal Gaussians and particle-based representations.

See mrpt::poses for the complete list of classes here.

mrpt::utils

mrpt::math

MRPT defines a number of generic math containers, which are:

For a more in-depth description of these types, and their relation to the base Eigen classes, read this page.

Notice that fixed-size containers should be preferred where possible, since they allow more compile-time optimizations.

Apart from the containers, this namespace contains much more functionality:

mrpt::synch

This namespace includes threading tools such as critical sections, semaphores or utilities such as the template mrpt::synch::CThreadSafeVariable that converts any variable into a pair variable-critical section.

mrpt::system

Here can be found functions for filesystem managing, watching directories, creating and handling threads in an OS-independent way, etc.

mrpt::compress

GZip compression methods can be found in this namespace.

Classes

class  mrpt::config::CConfigFile
 This class allows loading and storing values and vectors of different types from ".ini" files easily. More...
 
class  mrpt::config::CConfigFileBase
 This class allows loading and storing values and vectors of different types from a configuration text, which can be implemented as a ".ini" file, a memory-stored string, etc... More...
 
class  mrpt::config::CConfigFileMemory
 This class implements a config file-like interface over a memory-stored string list. More...
 
class  mrpt::config::CLoadableOptions
 This is a virtual base class for sets of options than can be loaded from and/or saved to configuration plain-text files. More...
 
class  mrpt::db::CSimpleDatabaseTable
 This class implements the tables of databases. More...
 
class  mrpt::expr::CRuntimeCompiledExpression
 A wrapper of exprtk runtime expression compiler: it takes a string representing an expression (from a simple mathematical formula to a complete program), compiles it and evaluates its result as many times as required. More...
 
class  mrpt::hmtslam::CMHPropertiesValuesList
 An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable object (Multi-hypotheses version). More...
 
class  mrpt::hmtslam::CPropertiesValuesList
 An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable object. More...
 
class  mrpt::opengl::PLY_Importer
 A virtual base class that implements the capability of importing 3D point clouds and faces from a file in the Stanford PLY format. More...
 
class  mrpt::opengl::PLY_Exporter
 A virtual base class that implements the capability of exporting 3D point clouds and faces to a file in the Stanford PLY format. More...
 
class  mrpt::serialization::CMemoryChunkBase< Derived >
 A memory buffer (implements CStream) which can be itself serialized. More...
 
class  mrpt::system::CConsoleRedirector
 By creating an object of this class, all the output to std::cout (and std::cerr) will be redirected to a text file, and optionally also shown on the console. More...
 
class  mrpt::system::mrptEventOnDestroy
 An event sent by any CObservable object (automatically) just before being destroyed and telling its observers to unsubscribe. More...
 
struct  mrpt::tfest::TMatchingPair
 A structure for holding correspondences between two sets of points or points-like entities in 2D or 3D. More...
 
class  mrpt::tfest::TMatchingPairList
 A list of TMatchingPair. More...
 

Functions

template<typename T , class... Args>
std::shared_ptr< T > mrpt::make_aligned_shared (Args &&... args)
 Creates a shared_ptr with aligned memory via aligned_allocator_cpp11<>. More...
 

Parsing of textfiles with poses

template<class POSE_T >
void mrpt::poses::readFileWithPoses (const std::string &fname, std::vector< POSE_T > *poses_vec, std::vector< mrpt::system::TTimeStamp > *timestamps=NULL, bool substract_init_offset=false)
 Parse the textfile and fill in the corresponding poses vector. More...
 

Function Documentation

◆ make_aligned_shared()

template<typename T , class... Args>
std::shared_ptr<T> mrpt::make_aligned_shared ( Args &&...  args)

Creates a shared_ptr with aligned memory via aligned_allocator_cpp11<>.

Definition at line 78 of file aligned_allocator.h.

Referenced by mrpt::hwdrivers::COpenNI2_RGBD360::getNextObservation(), mrpt::hwdrivers::CVelodyneScanner::getNextObservation(), and mrpt::nav::CNavigatorManualSequence::loadConfigFile().

◆ readFileWithPoses()

template<class POSE_T >
void mrpt::poses::readFileWithPoses ( const std::string fname,
std::vector< POSE_T > *  poses_vec,
std::vector< mrpt::system::TTimeStamp > *  timestamps = NULL,
bool  substract_init_offset = false 
)

Parse the textfile and fill in the corresponding poses vector.

The file to be parsed is to contain 2D or 3D poses along with their corresponding timestamps, one line for each.

The expected format is the following:

For 2D Poses: timestamp x y theta (in rad) For 3D Poses in RPY form : x y z yaw pitch roll For 3D Poses in Quaternion form : x y z qw qx qy qz For 3D Poses in Quaternion form [TUM Datasets] : x y z qx qy qz qw

The 2D format abides to the groundtruth file format used by the GridMapNavSimul application

The TUM format is compatible with the groundtruth format for the TUM RGBD datasets as generated by the * rgbd_dataset2rawlog MRPT tool.

Parameters
[in]fnameFilename from which the timestamps and poses are read
[out]poses_vecstd::vector which is to contain the 2D poses.
[out]timestampsstd::vector which is to contain the timestamps for the corresponding ground truth poses. Ignore this argument if timestamps are not needed.
[in]substract_init_offsetIf true, the filled poses are to start from 0, that means, that if the first found pose is non-zero, it's going to be considered and offset and substracted from all poses in the file.
See also
http://www.mrpt.org/Collection_of_Kinect_RGBD_datasets_with_ground_truth_CVPR_TUM_2011

Definition at line 138 of file pose_utils.h.

References ASSERTMSG_, mrpt::system::fileExists(), mrpt::format(), mrpt::poses::internal::getPoseFromString(), MRPT_END, and MRPT_START.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019