MRPT
1.9.9
|
Back to list of all libraries | See all modules
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.
RTTI (RunTime Type Information): A cross-platform, compiler-independent RTTI system is built around the base class mrpt::utils::CObject.
Smart pointers: Based on std::shared_ptr<>, any class CFoo inheriting from CObject, automatically has associated smart pointers types CFoo::Ptr and CFoo::ConstPtr. MRPT implements advanced smart pointers capable of multi-thread safe usage and smart pointer typecasting with runtime check for correct castings (tutorial]).
Image handling: The class mrpt::img::CImage represents a wrapper around OpenCV IplImage's, plus extra functionality such as on-the-fly loading of images stored in disk upon first usage. The internal IplImage is always available so OpenCV's functions can be still used to operate on MRPT images.
Serialization/Persistence: Object serialization in a simple but powerful (including versioning) format is supported by dozens of MRPT classes, all based on mrpt::serialization::CSerializable.
Streams: Stream classes (see the base mrpt::utils::CStream) allow serialization of MRPT objects. There are classes for tranparent GZ-compressed files, sockets, serial ports, etc.
XML-based databases: Simple databases can be mantained, loaded and saved to files with mrpt::db::CSimpleDatabase.
Name-based argument passing: See the structure mrpt::system::TParameters
Configuration files: There is one base virtual class (mrpt::config::CConfigFileBase) which can be used to read/write configuration files (including basic types, vectors, matrices,...) from any "configuration source" transparently (an actual configuration file, a text block created on the fly, etc.).
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:
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.
Here can be found functions for filesystem managing, watching directories, creating and handling threads in an OS-independent way, etc.
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... | |
Modules | |
Scheduler helpers | |
(in #include <mrpt/system/scheduler.h>) | |
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 | 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... | |
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().
void 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.
[in] | fname | Filename from which the timestamps and poses are read |
[out] | poses_vec | std::vector which is to contain the 2D poses. |
[out] | timestamps | std::vector which is to contain the timestamps for the corresponding ground truth poses. Ignore this argument if timestamps are not needed. |
[in] | substract_init_offset | If 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. |
Definition at line 134 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: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |