namespace mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
namespace mrpt { // namespaces namespace mrpt::apps; namespace mrpt::bayes; namespace mrpt::bayes::detail; namespace mrpt::comms; namespace mrpt::comms::net; namespace mrpt::config; namespace mrpt::config::internal; namespace mrpt::containers; namespace mrpt::containers::internal; namespace mrpt::cpu; namespace mrpt::cpu::internal; namespace mrpt::detectors; namespace mrpt::expr; namespace mrpt::global_settings; namespace mrpt::graphs; namespace mrpt::graphs::detail; namespace mrpt::graphslam; namespace mrpt::graphslam::apps; namespace mrpt::graphslam::deciders; namespace mrpt::graphslam::detail; namespace mrpt::graphslam::optimizers; namespace mrpt::gtsam_wrappers; namespace mrpt::gui; namespace mrpt::gui::detail; namespace mrpt::gui::internal; namespace mrpt::hmtslam; namespace mrpt::hwdrivers; namespace mrpt::img; namespace mrpt::internal; namespace mrpt::io; namespace mrpt::io::internal; namespace mrpt::io::zip; namespace mrpt::kinematics; namespace mrpt::maps; namespace mrpt::maps::detail; namespace mrpt::maps::internal; namespace mrpt::maps::mrpt; namespace mrpt::maps::mrpt::maps; namespace mrpt::maps::mrpt::maps::COctoMapBase; namespace mrpt::math; namespace mrpt::math::detail; namespace mrpt::math::internal; namespace mrpt::nav; namespace mrpt::obs; namespace mrpt::obs::detail; namespace mrpt::obs::gnss; namespace mrpt::obs::gnss::nv_oem6_ins_status_type; namespace mrpt::obs::gnss::nv_oem6_position_type; namespace mrpt::obs::gnss::nv_oem6_solution_status; namespace mrpt::obs::stock_observations; namespace mrpt::obs::utils; namespace mrpt::opengl; namespace mrpt::opengl::graph_tools; namespace mrpt::opengl::internal; namespace mrpt::opengl::stock_objects; namespace mrpt::poses; namespace mrpt::poses::Lie; namespace mrpt::poses::detail; namespace mrpt::poses::internal; namespace mrpt::random; namespace mrpt::ros1bridge; namespace mrpt::rtti; namespace mrpt::rtti::internal; namespace mrpt::serialization; namespace mrpt::serialization::detail; namespace mrpt::serialization::internal; namespace mrpt::serialization::metaprogramming; namespace mrpt::slam; namespace mrpt::slam::detail; namespace mrpt::system; namespace mrpt::system::os; namespace mrpt::tfest; namespace mrpt::tfest::internal; namespace mrpt::topography; namespace mrpt::typemeta; namespace mrpt::typemeta::detail; namespace mrpt::typemeta::internal; namespace mrpt::vision; namespace mrpt::vision::detail; namespace mrpt::vision::pinhole; namespace mrpt::vision::pnp; // typedefs typedef std::basic_string<T, std::char_traits<T>, mrpt::aligned_allocator_cpp11<T>> aligned_std_basicstring; typedef std::vector<T, mrpt::aligned_allocator_cpp11<T>> aligned_std_vector; typedef typename int_select_by_bytecount<num_bytes>::type int_select_by_bytecount_t; typedef typename uint_select_by_bytecount<num_bytes>::type uint_select_by_bytecount_t; typedef std::optional<std::reference_wrapper<T>> optional_ref; typedef spimpl::impl_ptr<T> pimpl; typedef safe_ptr_basic<void> void_ptr; typedef non_copiable_ptr_basic<void> void_ptr_noncopy; // structs template <class BASE_EXCEPTION> struct ExceptionWithCallBack; struct ExceptionWithCallBackBase; struct TCallStackBackTrace; struct TCallStackEntry; template <class T> struct copiable_NULL_ptr; template <class T> struct copiable_NULL_ptr_basic; template <class T> struct ignored_copy_ptr; template <> struct int_select_by_bytecount<8>; template <> struct int_select_by_bytecount<4>; template <> struct int_select_by_bytecount<3>; template <> struct int_select_by_bytecount<2>; template <unsigned int num_bytes> struct int_select_by_bytecount; template <> struct int_select_by_bytecount<1>; template <class T> struct is_defined<T, std::enable_if_t<(sizeof(T)> 0)>; template <class T, class Enable = void> struct is_defined; template <class T> struct is_shared_ptr; template <class T> struct is_shared_ptr<std::shared_ptr<T>>; template <class T> struct non_copiable_ptr; template <class T> struct non_copiable_ptr_basic; template <typename CAST_TO> struct ptr_cast; template <class T> struct safe_ptr; template <class T> struct safe_ptr_basic; template <> struct uint_select_by_bytecount<3>; template <> struct uint_select_by_bytecount<2>; template <> struct uint_select_by_bytecount<4>; template <unsigned int num_bytes> struct uint_select_by_bytecount; template <> struct uint_select_by_bytecount<1>; template <> struct uint_select_by_bytecount<8>; // classes class Clock; template <class T> class LockHelper; class Stringifyable; class WorkerThreadsPool; template <class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES> class aligned_allocator_cpp11; // global variables constexpr bool is_defined_v = is_defined<T>::value; // global functions template <class Visitor, class... T> void visit_each( const Visitor& vis, T&&... t ); void* aligned_malloc( size_t size, size_t alignment ); void aligned_free(void* ptr); void* aligned_calloc(size_t bytes, size_t alignment); void callStackBackTrace( TCallStackBackTrace& out_bt, const unsigned int framesToSkip = 1, const unsigned int framesToCapture = 64 ); TCallStackBackTrace callStackBackTrace(const unsigned int framesToSkip = 1, const unsigned int framesToCapture = 64); template <typename num_t, typename return_t = num_t> return_t square(const num_t x); template <class T> T hypot_fast(const T x, const T y); constexpr double DEG2RAD(const double x); constexpr float DEG2RAD(const float x); constexpr double DEG2RAD(const int x); constexpr double RAD2DEG(const double x); constexpr float RAD2DEG(const float x); constexpr long double DEG2RAD(const long double x); constexpr long double RAD2DEG(const long double x); constexpr double operator"" _deg (long double v); template <typename T> int sign(T x); template <typename T> int signWithZero(T x); template <typename T> T lowestPositive(const T a, const T b); template <typename T> T abs_diff(const T a, const T b); template <typename T> const T min3( const T& A, const T& B, const T& C ); template <typename T> const T max3( const T& A, const T& B, const T& C ); template <typename T> int fix(T x); template <typename T, typename K> void keep_min(T& var, const K test_val); template <typename T, typename K> void keep_max(T& var, const K test_val); template <typename T> void saturate(T& var, const T sat_min, const T sat_max); template <typename T> T saturate_val(const T& value, const T sat_min, const T sat_max); template <class T> T round2up(T val); float d2f(const double d); uint8_t f2u8(const float f); float u8tof(const uint8_t v); template <class VECTOR_T> void vector_strong_clear(VECTOR_T& v); template <std::size_t N, typename F> void for_(F func); std::string demangle(const std::string& symbolName); std::string exception_to_str(const std::exception& e); std::string format(const char* fmt, ...); template <typename T> std::string std::string to_string(T v); std::string to_string(std::string v); std::string to_string(bool v); std::string to_string(const char* s); template <typename T> T from_string( const std::string& s, const T& defValue = T{}, bool throw_on_error = true ); template <class T> T get_env(const std::string_view& varname, const T& defValue = T()); bool get_env(const std::string_view& varname, const bool& defValue); template <class T> LockHelper<T> lockHelper(T& t); template <class T, class... Args> pimpl<T> make_impl(Args&&... args); void reverseBytesInPlace(bool& v_in_out); void reverseBytesInPlace(uint8_t& v_in_out); void reverseBytesInPlace(int8_t& v_in_out); void reverseBytesInPlace(uint16_t& v_in_out); void reverseBytesInPlace(int16_t& v_in_out); void reverseBytesInPlace(uint32_t& v_in_out); void reverseBytesInPlace(int32_t& v_in_out); void reverseBytesInPlace(uint64_t& v_in_out); void reverseBytesInPlace(int64_t& v_in_out); void reverseBytesInPlace(float& v_in_out); void reverseBytesInPlace(double& v_in_out); void reverseBytesInPlace(std::chrono::time_point<mrpt::Clock>& v_in_out); template <class T> void reverseBytes(const T& v_in, T& v_out); template <class T> T reverseBytes(const T& v_in); template <class T> T toNativeEndianness(const T& v_in); template < typename enum_t, typename underlying_t = typename std::underlying_type<enum_t>::type > void reverseBytesInPlace_enum(enum_t& v); template <typename T> int round(const T value); template <typename T> long round_long(const T value); template <class T> T round_10power(T val, int power10); std::string winerror2str(const char* caller = nullptr, const char* errorPrefix = " Error: "); } // namespace mrpt
Global Functions
void* aligned_calloc(size_t bytes, size_t alignment)
Identical to aligned_malloc, but it zeroes the reserved memory block.
bool get_env(const std::string_view& varname, const bool& defValue)
Specialization for bool: understands “true”, “True”, number!=0 as true