struct mola::LidarOdometry::MethodState

Overview

All variables that hold the algorithm state

struct MethodState
{
    // fields

    bool initialized = false;
    bool fatal_error = false;
    bool initial_localization_done = false;
    bool active = true;
    int worker_tasks = 0;
    mrpt::poses::CPose3DPDFGaussian last_lidar_pose;
    std::map<std::string, mrpt::Clock::time_point> last_obs_tim_by_label;
    bool last_icp_was_good = true;
    double last_icp_quality = .0;
    std::optional<mrpt::Clock::time_point> first_ever_timestamp;
    std::optional<mrpt::Clock::time_point> last_obs_timestamp;
    std::optional<mrpt::Clock::time_point> last_icp_timestamp;
    std::map<std::string, mrpt::obs::CObservation::Ptr> sync_obs;
    mola::NavStateFuse navstate_fuse;
    std::optional<NavState> last_motion_model_output;
    mp2p_icp::ParameterSource parameter_source;
    double adapt_thres_sigma = 0;
    std::optional<double> estimated_sensor_max_range;
    std::optional<double> instantaneous_sensor_max_range;
    mp2p_icp_filters::GeneratorSet obs_generators;
    mp2p_icp_filters::FilterPipeline pc_filterAdjustTimes;
    mp2p_icp_filters::FilterPipeline pc_filter1;
    mp2p_icp_filters::FilterPipeline pc_filter2;
    mp2p_icp_filters::FilterPipeline pc_filter3;
    mp2p_icp_filters::GeneratorSet local_map_generators;
    mp2p_icp::metric_map_t::Ptr local_map = mp2p_icp::metric_map_t::Create();
    mp2p_icp_filters::FilterPipeline obs2map_merge;
    mrpt::poses::CPose3DInterpolator estimated_trajectory;
    mrpt::maps::CSimpleMap reconstructed_simplemap;
    std::optional<SearchablePoseList> distance_checker_local_map;
    std::optional<SearchablePoseList> distance_checker_simplemap;
    uint32_t localmap_check_removal_counter = 0;
    uint32_t localmap_advertise_updates_counter = 0;
    bool local_map_needs_viz_update = true;
    std::map<mrpt::Clock::time_point, std::shared_ptr<mrpt::obs::CObservationGPS>> last_gnss_;
    mrpt::opengl::CSetOfObjects::Ptr glVehicleFrame;
    mrpt::opengl::CSetOfObjects::Ptr glPathGrp;
    mrpt::opengl::CSetOfLines::Ptr glEstimatedPath;
    int mapUpdateCnt = std::numeric_limits<int>::max();
    std::map<mrpt::Clock::time_point, mrpt::obs::CSensoryFrame::Ptr> past_simplemaps_observations;
};

Fields

bool active = true

if false, input observations will be just ignored. Useful for real-time execution on robots.

mrpt::poses::CPose3DPDFGaussian last_lidar_pose

in local map

std::map<std::string, mrpt::obs::CObservation::Ptr> sync_obs

Cache for multiple LIDAR synchronization:

mp2p_icp::ParameterSource parameter_source

The source of “dynamic variables” in ICP pipelines:

uint32_t localmap_check_removal_counter = 0

See check_for_removal_every_n.

bool local_map_needs_viz_update = true

To update the map in the viz only if really needed.