Struct Pairings

Struct Documentation

struct Pairings

Common pairing input data for OLAE, Horn’s, and other solvers. Planes and lines must have unit director and normal vectors, respectively.

Pairings are between a “global” (or “this”) and a “local” (or “other”) pointcloud, while we are searching for the relative pose of “local” wrt “global”, such that “relative_pose \oplus localPoint = globalPoint”.

Data fields

mrpt::tfest::TMatchingPairList paired_pt2pt

We reuse MRPT struct to allow using their matching functions.

Note

on MRPT naming convention: “this”=global; “other”=local.

MatchedPointLineList paired_pt2ln
MatchedPointPlaneList paired_pt2pl
MatchedLineList paired_ln2ln
MatchedPlaneList paired_pl2pl
uint64_t potential_pairings = 0

Each Matcher will add pairings in the fields above, and will increment this potential_pairings with the maximum number of potential pairings that it might have found. That is, the ratio of successful pairings is this->size() / double(potential_pairings).

std::vector<std::pair<std::size_t, double>> point_weights

Individual weights for paired_pt2pt: each entry specifies how many points have the given (mapped second value) weight, in the same order as stored in paired_pt2pt. If empty, all points will have equal weights.

Methods

inline virtual bool empty() const
virtual size_t size() const

Overall number of element-to-element pairings (points, lines, planes)

virtual std::string contents_summary() const

Returns a string summarizing all the paired elements

virtual void push_back(const Pairings &o)

Copy and append pairings from another container.

virtual void push_back(Pairings &&o)

Move pairings from another container.

virtual void serializeTo(mrpt::serialization::CArchive &out) const
virtual void serializeFrom(mrpt::serialization::CArchive &in)
virtual auto get_visualization(const mrpt::poses::CPose3D &localWrtGlobal, const pairings_render_params_t &p = pairings_render_params_t()) const -> std::shared_ptr<mrpt::opengl::CSetOfObjects>

Gets a renderizable view of all geometric entities.

See render_params_t for options to show/hide the different geometric entities and point layers.

Note

If deriving user classes inheriting from metric_map_t, remember to reimplement this method and call this base class method to render common elements.

virtual void get_visualization_pt2pt(mrpt::opengl::CSetOfObjects &o, const mrpt::poses::CPose3D &localWrtGlobal, const render_params_pairings_pt2pt_t &p) const

Used inside get_visualization(), renders pt-to-pt pairings only.

virtual void get_visualization_pt2pl(mrpt::opengl::CSetOfObjects &o, const mrpt::poses::CPose3D &localWrtGlobal, const render_params_pairings_pt2pl_t &p) const

Used inside get_visualization(), renders pt-to-pl pairings only.

virtual void get_visualization_pt2ln(mrpt::opengl::CSetOfObjects &o, const mrpt::poses::CPose3D &localWrtGlobal, const render_params_pairings_pt2ln_t &p) const

Used inside get_visualization(), renders pt-to-ln pairings only.

Public Functions

Pairings() = default
virtual ~Pairings()