template class mrpt::graphslam::deciders::CFixedIntervalsNRD

Fixed Intervals Odometry-based Node Registration.

Determine whether to insert a new pose in the graph given the distance and angle thresholds. When the odometry readings indicate that any of the thresholds has been surpassed, with regards to the previous registered pose, a new node is added in the graph.

Current decider is a minimal, simple implementation of the CNodeRegistrationDecider interface which can be used for 2D datasets. Decider does not guarantee thread safety when accessing the GRAPH_T resource. This is handled by the CGraphSlamEngine instance.

  • Map type: 2D

  • MRPT rawlog format: #1, #2

  • Graph Type: CPosePDFGaussianInf

  • Observations Used: CObservationOdometry, CActionRobotMovement2D

  • Node Registration Strategy: Fixed Odometry Intervals

  • class_verbosity

  • registration_max_distance

    • Section : NodeRegistrationDeciderParameters

    • Default value : 0.5 // meters

    • Required : FALSE

  • registration_max_angle

    • Section : NodeRegistrationDeciderParameters

    • Default value : 60 // degrees

    • Required : FALSE

#include <mrpt/graphslam/NRD/CFixedIntervalsNRD.h>

template <class GRAPH_T = typename mrpt::graphs::CNetworkOfPoses2DInf>
class CFixedIntervalsNRD: public mrpt::graphslam::deciders::CNodeRegistrationDecider
{
public:
    // typedefs

    typedef mrpt::graphslam::deciders::CNodeRegistrationDecider<GRAPH_T> node_reg;
    typedef typename GRAPH_T::constraint_t constraint_t;
    typedef typename GRAPH_T::constraint_t::type_value pose_t;
    typedef typename GRAPH_T::global_pose_t global_pose_t;
    typedef mrpt::math::CMatrixFixed<double, constraint_t::state_length, constraint_t::state_length> inf_mat_t;
    typedef mrpt::graphslam::deciders::CNodeRegistrationDecider<GRAPH_T> parent_t;

    // structs

    struct TParams;

    //
fields

    TParams params;

    // construction

    CFixedIntervalsNRD();

    //
methods

    virtual void loadParams(const std::string& source_fname);
    virtual void printParams() const;
    virtual void getDescriptiveReport(std::string* report_str) const;
    virtual bool updateState(mrpt::obs::CActionCollection::Ptr action, mrpt::obs::CSensoryFrame::Ptr observations, mrpt::obs::CObservation::Ptr observation);
    virtual global_pose_t getCurrentRobotPosEstimation() const;
};

Inherited Members

public:
    // typedefs

    typedef typename GRAPH_T::constraint_t::type_value pose_t;
    typedef typename GRAPH_T::global_pose_t global_pose_t;
    typedef mrpt::math::CMatrixFixed<double, constraint_t::state_length, constraint_t::state_length> inf_mat_t;

    // structs

    struct TMsg;

    //
methods

    virtual void setClassName(const std::string& name);
    bool isMultiRobotSlamClass();
    std::string getClassName() const;

Typedefs

typedef mrpt::graphslam::deciders::CNodeRegistrationDecider<GRAPH_T> node_reg

Handy typedefs.

Node Registration Decider

typedef typename GRAPH_T::constraint_t constraint_t

type of graph constraints

typedef typename GRAPH_T::constraint_t::type_value pose_t

type of underlying poses (2D/3D).

typedef mrpt::graphslam::deciders::CNodeRegistrationDecider<GRAPH_T> parent_t

Node Registration Decider.

Methods

virtual void loadParams(const std::string& source_fname)

Load the necessary for the decider/optimizer configuration parameters.

virtual void printParams() const

Print the problem parameters - relevant to the decider/optimizer to the screen in a unified/compact way.

virtual void getDescriptiveReport(std::string* report_str) const

Fill the provided string with a detailed report of the decider/optimizer state.

Report should include (part of) the following:

  • Timing of important methods

  • Properties fo class at the current time

  • Logging of commands until current time

virtual bool updateState(mrpt::obs::CActionCollection::Ptr action, mrpt::obs::CSensoryFrame::Ptr observations, mrpt::obs::CObservation::Ptr observation)

Method makes use of the CActionCollection/CObservation to update the odometry estimation from the last inserted pose.

Returns:

True upon successful node registration in the graph

virtual global_pose_t getCurrentRobotPosEstimation() const

Getter method for fetching the currently estimated robot position.

In single-robot situations this is most likely going to be the last registered node position + an position/uncertainty increment from that position