Global Namespace
Overview
// namespaces namespace IMPLEMENTS_MRPT_OBJECT; namespace gtsam; namespace literals; namespace math; namespace mola; namespace mola::cov_diag; namespace mola::detail; namespace mola::factors; namespace mola::gui; namespace mola::imu; namespace mola::internal; namespace mola::kf_cli; namespace mola::mm_cli; namespace mola::state_estimation_simple; namespace mola::state_estimation_smoother; namespace mola_test; namespace mp2p_icp; namespace mp2p_icp::internal; namespace mp2p_icp_filters; namespace mp2p_icp_filters::internal; namespace mrpt; namespace mrpt::config; namespace mrpt::containers; namespace mrpt::maps; namespace mrpt::obs; namespace mrpt::rtti; namespace mrpt::serialization; namespace mrpt::system; namespace rosbag2_cpp; namespace rosbag2_cpp::readers; namespace rosbag2_storage; namespace std; namespace string_literals; namespace tf2; // typedefs typedef mrpt::math::CMatrixDouble44 Matrix; // structs struct Cli; struct HandlersContainer; struct LoadedModules; struct MLSResult; struct OLAE_LinearSystems; struct VoxelEntry; struct VoxelKey; struct VoxelKeyHash; struct errors; // classes template <typename T> class TraitsTest; // global variables static PyObject* markup; static PyMethodDef module_methods[]; static struct PyModuleDef module_definition = { PyModuleDef_HEAD_INIT, "markupsafe._speedups", NULL, -1, module_methods, NULL, NULL, NULL, NULL }; constexpr size_t READ_AHEAD_LEN = 10; constexpr size_t MAX_UNLOAD_LEN = 500; static const unsigned int mola_icon_width = 64; static const unsigned int mola_icon_height = 64; static const char* mola_icon_data; static std::map<std::string, LoadedModules> loaded_lib_handled; constexpr size_t HARD_MAX_MATCHES = 3; const thread_local auto ENV_DO_PROFILE_COV = mrpt::get_env<bool>("MOLA_KEYFRAME_MAP_PROFILE_COV", false); const thread_local auto ENV_DEBUG_ACTIVE_KFS = mrpt::get_env<bool>("MOLA_KEYFRAME_MAP_DEBUG_ACTIVE_KFS", false); constexpr size_t HARD_MAX_MATCHES = 3; const std::string datasetsRoot = TEST_DATASETS_ROOT; const float lengths[] = {100, 200, 300, 400, 500, 600, 700, 800}; const int32_t num_lengths = 8; constexpr size_t MAX_UNLOAD_LEN = 250; constexpr size_t MAX_UNLOAD_LEN = 250; constexpr size_t MAX_UNLOAD_LEN = 250; static const uint8_t DIPI_SERIALIZATION_VERSION = 0; static const uint8_t SERIALIZATION_VERSION = 3; const bool MP2P_ICP_GENERATE_DEBUG_FILES = mrpt::get_env<bool>("MP2P_ICP_GENERATE_DEBUG_FILES", false); static const uint8_t SERIALIZATION_VERSION = 1; constexpr const char* GEOREF_MAGIC_STR = "mp2p_icp::Georeferencing"; // global functions static int init_constants(void); static PyObject* escape_unicode_kind1(PyUnicodeObject* in); static PyObject* escape_unicode_kind2(PyUnicodeObject* in); static PyObject* escape_unicode_kind4(PyUnicodeObject* in); static PyObject* escape_unicode(PyUnicodeObject* in); static PyObject* escape( PyObject* self, PyObject* text ); static PyObject* escape_silent( PyObject* self, PyObject* text ); static PyObject* soft_str( PyObject* self, PyObject* s ); PyMODINIT_FUNC PyInit__speedups(void); MRPT_INITIALIZER(do_register_InputROS2); MRPT_INITIALIZER(do_register_BinFileDataset); MRPT_INITIALIZER(do_register_RawlogDataset); MRPT_INITIALIZER(do_register_Rosbag2Dataset); MRPT_FILL_ENUM(mola::InputMode::ImageDirectory); MRPT_FILL_ENUM(mola::InputMode::VideoFile); MRPT_FILL_ENUM(mola::InputMode::LiveCamera); MRPT_INITIALIZER(register_VideoDataset); MRPT_INITIALIZER(do_register_mola_kernel); MRPT_INITIALIZER(do_register_mola_metric_maps); MRPT_INITIALIZER(register_mp2p_icp); MRPT_INITIALIZER(register_mp2p_icp_common); MRPT_INITIALIZER(register_mola_lidar_segmentation); MRPT_INITIALIZER(register_mp2p_icp_map); MRPT_INITIALIZER(do_register_navstate_fuse); MRPT_INITIALIZER(do_register_navstate_fuse); MRPT_INITIALIZER(do_register_navstate_fuse); int main(); int main( int argc, char** argv ); int main( int argc, char** argv ); int main( int argc, char** argv ); const std::map<std::string, LoadedModules>& get_loaded_modules(); void internal_load_lib_modules( mrpt::system::COutputLogger& app, const std::vector<std::string>& lib_search_paths ); static void internal_unload_lib_modules(); void internal_load_lib_modules( mrpt::system::COutputLogger& app, const std::vector<std::string>& lib_search_paths ); const std::map<std::string, LoadedModules>& get_loaded_modules(); void run_ini2mm( const std::string& filInput, const std::string& filIni, const std::string& filOutput, const std::string& plugins ); int main( int argc, char** argv ); int main( int argc, char** argv ); int main( int argc, char** argv ); int main( int argc, char** argv ); void run_mm2ini( const std::string& filInput, const std::string& filOutput, const std::string& plugins ); int main( int argc, char** argv ); MRPT_FILL_ENUM(ViewDirectionFilter::None); MRPT_FILL_ENUM(ViewDirectionFilter::MaxAngle); MRPT_FILL_ENUM(ViewDirectionFilter::SurfaceSide); int main(); void test_voxelmap_basic_ops(); void test_voxelmap_insert_2d_scan(); int main( ] int argc, ] char** argv ); int main( int argc, char** argv ); int main( int argc, char** argv ); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); TEST_CLASS_MOVE_COPY_CTORS(mola::SparseVoxelPointCloud); TEST_CLASS_MOVE_COPY_CTORS(mola::OccGrid); void test_serialization(); int main( ] int argc, ] char** argv ); void test_voxelmap_basic_ops(); void test_voxelmap_insert_2d_scan(); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); static void test1(); int main( ] int argc, ] char** argv ); int main( int argc, char** argv ); int main( int argc, char** argv ); int main( int argc, char** argv ); int main( int argc, char** argv ); int main( int argc, char** argv ); MRPT_INITIALIZER(do_register_MolaViz); void mola_viz_imgui_register_default_handlers(); MRPT_INITIALIZER(do_register_MolaVizImGui); void mola_viz_imgui_register_default_handlers(); int main( ] int argc, ] char** argv ); static bool eval(Cli& cli); static void do_kitti_eval_error(Cli& cli); int main( int argc, char** argv ); static void parse_calib_line( const std::string& line, Eigen::Matrix<double, 3, 4>& M ); std::vector<Matrix> loadPoses_tum_format( Cli& cli, const std::string& file_name, const std::string& calib_file, bool isGT ); std::vector<Matrix> loadPoses(string file_name); vector<float> trajectoryDistances(vector<Matrix>& poses); int32_t lastFrameFromSegmentLength( vector<float>& dist, int32_t first_frame, float len ); float rotationError(Matrix& pose_error); float translationError(Matrix& pose_error); vector<errors> calcSequenceErrors( vector<Matrix>& poses_gt, vector<Matrix>& poses_result ); void saveSequenceErrors( vector<errors>& err, string file_name ); void savePathPlot( vector<Matrix>& poses_gt, vector<Matrix>& poses_result, string file_name ); vector<int32_t> computeRoi( vector<Matrix>& poses_gt, vector<Matrix>& poses_result ); void plotPathPlot( Cli& cli, string dir, vector<int32_t>& roi, int32_t idx ); void saveErrorPlots( vector<errors>& seq_err, string plot_error_dir, const char* prefix ); void plotErrorPlots( Cli& cli, string dir, const char* prefix ); void saveStats( vector<errors> err, string dir ); MRPT_INITIALIZER(do_register_EurocDataset); MRPT_INITIALIZER(do_register_Kitti360Dataset); MRPT_INITIALIZER(do_register_KittiOdometryDataset); MRPT_INITIALIZER(do_register_MulranDataset); MRPT_INITIALIZER(do_register_ParisLucoDataset); static void build_list_files( const std::string& dir, const std::string& file_extension, std::vector<std::string>& out_lst ); MRPT_FILL_ENUM(InitLocalization::FixedPose); MRPT_FILL_ENUM(InitLocalization::FromStateEstimator); MRPT_FILL_ENUM(InitLocalization::PitchAndRollFromIMU); int main( int argc, char** argv ); static bool is_binary_georef(const std::string& fil); void run_sm_georef(); int main( int argc, char** argv ); void run_traj_georef(); int main( int argc, char** argv ); int main(); int main(); int main(); int main(); int main(); int main(); int main(); void test_imu_propagation(); void test_imu_propagation_accel_bias(); void test_imu_propagation_after_3d_odometry(); int main( ] int argc, ] char** argv ); int ( int argc, char** argv ); int ( ] int argc, ] char** argv ); void test_disabled_by_default(); void test_covers_the_whole_run(); void test_covers_the_whole_run_without_intermediate_solves(); void test_unknown_frame(); int main( int argc, char** argv ); int main( ] int argc, ] char** argv ); int main(); int main(); int main( ] int argc, ] char** argv ); int main( int argc, char** argv ); int main( ] int argc, ] char** argv ); int ( int argc, char** argv ); int ( ] int argc, ] char** argv ); int ( int argc, char** argv ); int main(); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); int main(); int main( ] int argc, ] char** argv ); int main(); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); int main(); int main( ] int argc, ] char** argv ); int main(); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); int main( ] int argc, ] char** argv ); MRPT_FILL_ENUM(CovarianceParameters::Method::InverseHessian); MRPT_FILL_ENUM_CUSTOM_NAME( CovarianceParameters::Method::InverseHessian, "InverseHessian" ); MRPT_FILL_ENUM(CovarianceParameters::Method::Censi3D); MRPT_FILL_ENUM_CUSTOM_NAME( CovarianceParameters::Method::Censi3D, "Censi3D" ); MRPT_FILL_ENUM(IterTermReason::Undefined); MRPT_FILL_ENUM(IterTermReason::NoPairings); MRPT_FILL_ENUM(IterTermReason::SolverError); MRPT_FILL_ENUM(IterTermReason::MaxIterations); MRPT_FILL_ENUM(IterTermReason::Stalled); MRPT_FILL_ENUM(IterTermReason::QualityCheckpointFailed); MRPT_FILL_ENUM(IterTermReason::HookRequest); MRPT_ENUM_TYPE_BEGIN_NAMESPACE(mola::state_estimation_smoother, mola::state_estimation_smoother::KinematicModel) MRPT_FILL_ENUM(KinematicModel MRPT_FILL_ENUM(KinematicModel::Tricycle); MRPT_FILL_ENUM(RobustKernel::None); MRPT_FILL_ENUM(RobustKernel::GemanMcClure); MRPT_FILL_ENUM(RobustKernel::Cauchy); static bool se3_l2_internal( const mp2p_icp::Pairings& in, const WeightParameters& wp, const mrpt::math::TPoint3D& ct_local, const mrpt::math::TPoint3D& ct_global, mrpt::math::CQuaternionDouble& out_attitude, OutlierIndices& in_out_outliers ); static mrpt::poses::CPose3D gibbs2pose(const Eigen::Vector3d& v); static OLAE_LinearSystems olae_build_linear_system( const Pairings& in, const WeightParameters& wp, const mrpt::math::TPoint3D& ct_local, const mrpt::math::TPoint3D& ct_global, OutlierIndices& in_out_outliers ); template <typename T> static void push_back_copy( const T& o, T& me ); template <typename T> static void push_back_move( T&& o, T& me ); template <typename CONTAINER> void append_container_size( const CONTAINER& c, const std::string& name, std::string& ret ); static void append_from_sorted( const std::multimap<double, mrpt::tfest::TMatchingPair>& sorted, Pairings& out, const double ratio ); static void projectPoint( const mrpt::math::TPoint3D& P, const mrpt::img::TCamera& params, double& pixel_x, double& pixel_y ); static double phi(double x); static double errorForMismatch(const double x); static double errorForMismatch( const double DeltaRange, const double sigma ); MRPT_FILL_ENUM(DecimateMethod::FirstPoint); MRPT_FILL_ENUM(DecimateMethod::RotatingIndex); MRPT_FILL_ENUM(DecimateMethod::ClosestToAverage); MRPT_FILL_ENUM(DecimateMethod::VoxelAverage); MRPT_FILL_ENUM(DecimateMethod::RandomPoint); MRPT_FILL_ENUM(TimestampAdjustMethod::EarliestIsZero); MRPT_FILL_ENUM(TimestampAdjustMethod::MiddleIsZero); MRPT_FILL_ENUM(TimestampAdjustMethod::Normalize); MRPT_FILL_ENUM(TimestampAdjustMethod::None); MRPT_FILL_ENUM(MotionCompensationMethod::None); MRPT_FILL_ENUM(MotionCompensationMethod::Linear); MRPT_FILL_ENUM(MotionCompensationMethod::IMU); MRPT_FILL_ENUM(MotionCompensationMethod::IMUh); MRPT_FILL_ENUM(MotionCompensationMethod::IMUt); MRPT_FILL_ENUM(FilterMLS::ProjectionMethod::SIMPLE); MRPT_FILL_ENUM(FilterMLS::UpsamplingMethod::NONE); MRPT_FILL_ENUM(FilterMLS::UpsamplingMethod::DISTINCT_CLOUD); // macros #define DECLARE_PARAMETER_IN_OPT( \ __yaml, \ __variable, \ __object \ ) #define DECLARE_PARAMETER_IN_REQ( \ __yaml, \ __variable, \ __object \ ) #define DECLARE_PARAMETER_OPT( \ __yaml, \ __variable \ ) #define DECLARE_PARAMETER_REQ( \ __yaml, \ __variable \ ) #define DLL_EXT #define ENSURE_YAML_ENTRY_EXISTS( \ _c, \ _name \ ) #define GET_DELTA( \ inp, \ inp_end, \ delta \ ) #define GTSAM_USES_BOOST #define GTSAM_VERSION_AT_LEAST( \ major, \ minor, \ patch \ ) #define HEADER_PIXEL( \ data, \ pixel \ ) #define MOLA_ARG_N( \ _1, \ _2, \ _3, \ _4, \ _5, \ _6, \ _7, \ _8, \ _9, \ _10, \ N, \ ... \ ) #define MOLA_KERNEL_DATASET_UI_HAS_ENABLED #define MOLA_KERNEL_DATASET_UI_HAS_TIME #define MOLA_KERNEL_VIZ_HAS_METRICS #define MOLA_KERNEL_VIZ_HAS_MOVABLE_FRAMES #define MOLA_LO_HAS_KEYFRAME_DECIDER #define MOLA_LO_HAS_MAP_FRAME_RELEVEL #define MOLA_NANOFLANN_FOUND_VERSION #define MOLA_NANOFLANN_HEADER #define MOLA_NARG(...) #define MOLA_NARG_I_(...) #define MOLA_POSE_LIST_HAS_FIND_NEARBY #define MOLA_POSE_LIST_HAS_ID_KEYED_API #define MOLA_POSE_LIST_HAS_KFM_POSE_PLUMBING #define MOLA_POSE_LIST_HAS_TRANSFORM_LEFT_MULTIPLY #define MOLA_REGISTER_MODULE(_classname) #define MOLA_RSEQ_N() #define MOLA_TEST_SETENV( \ name, \ val \ ) #define MOLA_TEST_UNSETENV(name) #define MOLA_VERSION_CHECK( \ major, \ minor, \ patch \ ) #define MOLA_VFUNC( \ name, \ n \ ) #define MOLA_VFUNC_( \ name, \ n \ ) #define MP2P_ICP_HAS_MATCHING_DISTANCE_PROFILE #define MP2P_ICP_HAS_NN_VISIT_PT2PL_CANDIDATES #define MP2P_ICP_HAS_POINT_WEIGHT_BY_INCIDENCE #define MP2P_ICP_HAS_POINT_WEIGHT_BY_RANGE #define TEST_CLASS_MOVE_COPY_CTORS(_classname) #define VFUNC( \ func, \ ... \ ) #define YAML_LOAD_MEMBER_OPT( \ _varname, \ _type \ ) #define YAML_LOAD_MEMBER_REQ( \ _varname, \ _type \ ) #define YAML_LOAD_OPT(...) #define YAML_LOAD_OPT2( \ _varname, \ _type \ ) #define YAML_LOAD_OPT3( \ _param_str, \ _varname, \ _type \ ) #define YAML_LOAD_OPT_DEG(...) #define YAML_LOAD_OPT_DEG2( \ _varname, \ _type \ ) #define YAML_LOAD_OPT_DEG3( \ _param_str, \ _varname, \ _type \ ) #define YAML_LOAD_REQ(...) #define YAML_LOAD_REQ2( \ _varname, \ _type \ ) #define YAML_LOAD_REQ3( \ _param_str, \ _varname, \ _type \ ) #define YAML_LOAD_REQ_DEG(...) #define YAML_LOAD_REQ_DEG2( \ _varname, \ _type \ ) #define YAML_LOAD_REQ_DEG3( \ _param_str, \ _varname, \ _type \ ) #define nanoflann
Global Variables
static std::map<std::string, LoadedModules> loaded_lib_handled
Global Functions
const std::map<std::string, LoadedModules>& get_loaded_modules()
Returns the current list of loaded module dyanmic libraries.
void internal_load_lib_modules( mrpt::system::COutputLogger& app, const std::vector<std::string>& lib_search_paths )
Loads all libs under lib_search_paths_.
See also:
setup()
void internal_load_lib_modules( mrpt::system::COutputLogger& app, const std::vector<std::string>& lib_search_paths )
Loads all libs under lib_search_paths_.
See also:
setup()
const std::map<std::string, LoadedModules>& get_loaded_modules()
Returns the current list of loaded module dyanmic libraries.
static OLAE_LinearSystems olae_build_linear_system( const Pairings& in, const WeightParameters& wp, const mrpt::math::TPoint3D& ct_local, const mrpt::math::TPoint3D& ct_global, OutlierIndices& in_out_outliers )
Core of the OLAE algorithm
Macros
#define MOLA_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...)
Picks the 11th argument - used internally by MOLA_NARG.
#define MOLA_KERNEL_DATASET_UI_HAS_ENABLED
Feature macro: Dataset_UI exposes datasetUI_enabled(), so a source that is only sometimes an offline dataset (e.g. live sensor vs. recorded file) can opt out of the playback panel at runtime.
#define MOLA_KERNEL_DATASET_UI_HAS_TIME
Feature macro: Dataset_UI exposes the dataset playback time via datasetUI_time() / datasetUI_total_time(). Intended for out-of-tree dataset sources (e.g. mola_input_rosbag1, mola_academic_datasets), which may be built against an older mola_kernel where overriding them fails.
#define MOLA_KERNEL_VIZ_HAS_METRICS
Feature macro: when defined, VizInterface offers register_metric() / push_metric() and the mola::MetricChannel handle type, i.e. the streaming time-series “metrics” plotting mechanism. Lets out-of-repo modules detect the feature at compile time.
#define MOLA_KERNEL_VIZ_HAS_MOVABLE_FRAMES
Feature macro: when defined, VizInterface offers update_3d_object_frame() and the parentFrame argument of update_3d_object(), insert_point_cloud_with_decay(), and update_viewport_look_at(), i.e. named movable reference-frame nodes that child objects / camera targets can be resolved against. Lets out-of-repo modules (e.g. an older mola_lidar_odometry checkout) detect the feature at compile time.
#define MOLA_LO_HAS_KEYFRAME_DECIDER
Feature macro: the keyframe-creation policy is shared between the local map and simplemap deciders (mola::KeyframeDecider) and supports a temporal window (nearby_keyframe_time_window).
#define MOLA_LO_HAS_MAP_FRAME_RELEVEL
Feature macro: mola_lidar_odometry provides the map-frame gauge-change helpers used by imu_gravity_correction.map_gravity.relevel_map_frame.
#define MOLA_POSE_LIST_HAS_FIND_NEARBY
Feature macro: SearchablePoseList exposes findNearby(), which returns the matching entries of a neighborhood query instead of only their count.
#define MOLA_POSE_LIST_HAS_ID_KEYED_API
Feature macro: SearchablePoseList exposes the id-keyed API (insert(pose, id), setPoseById) used by the online gravity-rebake feature to keep distance-checkers in sync with per-KF pose corrections. Downstream packages in separate repos should guard usage with #if defined(MOLA_POSE_LIST_HAS_ID_KEYED_API) (combined with __has_include(<mola_pose_list/SearchablePoseList.h>)) to remain buildable against older mola_pose_list checkouts.
#define MOLA_POSE_LIST_HAS_KFM_POSE_PLUMBING
Feature macro: SearchablePoseList exposes countNearby() and the sensor-pose-as-key plumbing used by mola_lidar_odometry. Downstream packages should guard usage with #if defined(MOLA_POSE_LIST_HAS_KFM_POSE_PLUMBING).
#define MOLA_POSE_LIST_HAS_TRANSFORM_LEFT_MULTIPLY
Feature macro: SearchablePoseList exposes transform_left_multiply(), used to re-express all stored poses after a change of the reference (map) frame.
#define MOLA_RSEQ_N()
Decreasing sequence used as the “ruler” for argument counting.
#define MOLA_VERSION_CHECK(major, minor, patch)
To be used in #if() checks for >= minimum MOLA versions.
#define MOLA_VFUNC(name, n)
Forces an extra expansion pass before concatenation (needed for correctness when either argument is itself a macro).
#define MOLA_VFUNC_(name, n)
Concatenates name and n after macro expansion of both.
#define MP2P_ICP_HAS_MATCHING_DISTANCE_PROFILE
Feature-detection macro for downstream packages: defined only by mp2p_icp releases that have MatchingDistanceProfile and the corresponding NearestPointWithCovCapable::nn_search_cov2cov() overload. Guard with __has_include(<mp2p_icp/MatchingDistanceProfile.h>) first, since an older release does not ship this header at all.
#define MP2P_ICP_HAS_NN_VISIT_PT2PL_CANDIDATES
Feature-detection macro for mp2p_icp::NearestPlaneCapable::nn_visit_pt2pl_candidates() and the associated PlaneCandidate / plane_candidate_visitor_t types. Downstream code that must build against both this and older mp2p_icp versions can #if defined(MP2P_ICP_HAS_NN_VISIT_PT2PL_CANDIDATES).
#define MP2P_ICP_HAS_POINT_WEIGHT_BY_INCIDENCE
Feature-detection macro for downstream packages, since an older release does not ship this header at all. Guard with __has_include(<mp2p_icp/PointWeightByIncidence.h>).
#define MP2P_ICP_HAS_POINT_WEIGHT_BY_RANGE
Feature-detection macro for downstream packages, since an older release does not ship this header at all. Guard with __has_include(<mp2p_icp/PointWeightByRange.h>).
#define VFUNC(func, ...)
Dispatch a variadic macro call to a numbered overload.
VFUNC(func, args...) expands to funcN(args...) where N is the number of arguments in args.
Parameters:
func |
Base name of the macro family (without trailing digit). |
… |
Arguments forwarded verbatim to the selected overload. |