Template Struct TUncertaintyPath

Inheritance Relationships

Base Type

  • public mrpt::config::CLoadableOptions

Struct Documentation

template<class GRAPH_T = typename mrpt::graphs::CNetworkOfPoses2DInf>
struct TUncertaintyPath : public mrpt::config::CLoadableOptions

Holds the data of an information path.

Path comprises of nodes (TNodeID type) and constraints between them. Only consecutive nodes are connected by edges, thus path.

See also

mrpt::deciders::CLoopCloserERD

Unnamed Group

bool determinant_is_updated

Determine whether the determinant of the Path is up-to-date and can be directly fetched or has to be computed again

double determinant_cached

Public Types

using constraint_t = typename GRAPH_T::constraint_t
using pose_t = typename constraint_t::type_value
using self_t = TUncertaintyPath<GRAPH_T>

Public Functions

TUncertaintyPath()
TUncertaintyPath(const mrpt::graphs::TNodeID &starting_node)
TUncertaintyPath(const mrpt::graphs::TNodeID &starting_node, const mrpt::graphs::TNodeID &ending_node, const constraint_t &edge)
~TUncertaintyPath() override = default
void clear()
bool isEmpty() const
void assertIsBetweenNodeIDs(const mrpt::graphs::TNodeID &from, const mrpt::graphs::TNodeID &to) const

Assert that the current path is between the given nodeIDs.

Call to this method practically checks if the give nodes match the source and destination nodeIDs.

Note

Assertions will be executed only in Debug builds

Throws:

std::runtime_error – in case the conditions don’t hold

virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &section) override
virtual void dumpToTextStream(std::ostream &out) const override
std::string getAsString() const
void getAsString(std::string *str) const
const mrpt::graphs::TNodeID &getSource() const

Return the source node of this path.

const mrpt::graphs::TNodeID &getDestination() const

Return the Destination node of this path.

double getDeterminant()
bool hasLowerUncertaintyThan(const self_t &other) const

Test if the current path has a lower uncertainty than the other path.

Returns:

True if the current path does have a lower uncertainty

void addToPath(const mrpt::graphs::TNodeID &node, const constraint_t &edge)

add a new link in the current path.

Add the node that the path traverses and the information matrix of the extra link

self_t &operator+=(const self_t &other)
bool operator==(const self_t &other) const
bool operator!=(const self_t &other) const

Public Members

std::vector<mrpt::graphs::TNodeID> nodes_traversed

Nodes that the Path comprises of.

Nodes in the path are added to the end of the vector.

constraint_t curr_pose_pdf

Current path position + corresponding covariance.

Friends

inline friend std::ostream &operator<<(std::ostream &o, const self_t &obj)