template class mrpt::poses::SO_average<3>

Overview

Computes weighted and un-weighted averages of SO(3) orientations.

Add values to average with append(), when done call get_average(). Use clear() to reset the accumulator and start a new average computation. Theoretical base: Average on SO(3) manifolds is computed by averaging the corresponding matrices, then projecting the result back to the closest matrix in the manifold. Shortly explained in these slides See also: eq. (3.7) in “MEANS AND AVERAGING IN THE GROUP OF ROTATIONS”, MAHER MOAKHER, 2002. Class introduced in MRPT 1.3.1

See also:

SE_traits

#include <mrpt/poses/SO_SE_average.h>

template <>
class SO_average<3>
{
public:
    // fields

    bool enable_exception_on_undeterminate {false};

    // construction

    SO_average();

    // methods

    void clear();
    void append(const mrpt::math::CMatrixDouble33& M);
    void append(const mrpt::math::CMatrixDouble33& M, const double weight);
    mrpt::math::CMatrixDouble33 get_average() const;
};

Fields

bool enable_exception_on_undeterminate {false}

(Default=false) Set to true if you want to raise an exception on undetermined average values.

Construction

SO_average()

Constructor.

Methods

void clear()

Resets the accumulator.

void append(const mrpt::math::CMatrixDouble33& M)

Adds a new orientation to the computation.

See also:

get_average

void append(const mrpt::math::CMatrixDouble33& M, const double weight)

Adds a new orientation to the weighted-average computation.

See also:

get_average

mrpt::math::CMatrixDouble33 get_average() const

Returns the average orientation.

Parameters:

std::logic_error

If no data point were inserted.

std::runtime_error

Upon undeterminate average value (ie there was a problem with the SVD) and enable_exception_on_undeterminate is set to true (otherwise, the 0 orientation would be returned)

See also:

append