Map-frame gauge change

Overview

A change of the map frame is a GAUGE change, not a state update: every quantity expressed in the map frame is left-composed with the same rigid transform b, so all relative poses, distances and angles between mapped entities are preserved exactly. Quantities expressed in the vehicle’s own frame (body-frame twists, sensor extrinsics) are invariant and must NOT be touched.

The overloads below apply p -> b + p to each of the containers the odometry keeps in the map frame. They are free functions so that the invariant above is testable without a running odometry instance.

// global functions

void mola::transform_to_new_map_frame(mrpt::poses::CPose3DInterpolator& trajectory, const mrpt::poses::CPose3D& b);
void mola::transform_to_new_map_frame(mrpt::maps::CSimpleMap& sm, const mrpt::poses::CPose3D& b);
void mola::transform_to_new_map_frame(mp2p_icp::metric_map_t& m, const mrpt::poses::CPose3D& b);

Global Functions

void mola::transform_to_new_map_frame(
    mrpt::poses::CPose3DInterpolator& trajectory,
    const mrpt::poses::CPose3D& b
    )

Applies p -> b + p to every pose of a trajectory.

void mola::transform_to_new_map_frame(
    mrpt::maps::CSimpleMap& sm,
    const mrpt::poses::CPose3D& b
    )

Applies p -> b + p to every keyframe pose (mean and covariance) of a simplemap. The per-keyframe twists are in the vehicle frame and are left untouched.

void mola::transform_to_new_map_frame(
    mp2p_icp::metric_map_t& m,
    const mrpt::poses::CPose3D& b
    )

Applies p -> b + p to every layer of a metric map.

Parameters:

std::exception

if any layer is of a type that cannot be transformed, or if the map carries geo-referencing (which the transform would silently invalidate).