Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Member Functions | Public Attributes | Private Attributes
mrpt::poses::SE_average< 3 > Class Reference

Detailed Description

Computes weighted and un-weighted averages of SE(3) poses.

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: See SO_average<3> for the rotation part. The translation is a simple arithmetic mean in Euclidean space.

Note
Class introduced in MRPT 1.3.1
See also
SE_traits

Definition at line 160 of file SO_SE_average.h.

#include <mrpt/poses/SO_SE_average.h>

Public Member Functions

 SE_average ()
 Constructor. More...
 
void clear ()
 Resets the accumulator. More...
 
void append (const mrpt::poses::CPose3D &p)
 Adds a new pose to the computation. More...
 
void append (const mrpt::poses::CPose3D &p, const double weight)
 Adds a new pose to the weighted-average computation. More...
 
void append (const mrpt::math::TPose3D &p, const double weight)
 
void get_average (mrpt::poses::CPose3D &out_mean) const
 Returns the average pose. More...
 

Public Attributes

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

Private Attributes

double m_count
 
double m_accum_x
 
double m_accum_y
 
double m_accum_z
 
SO_average< 3 > m_rot_part
 

Constructor & Destructor Documentation

◆ SE_average()

Constructor.

Member Function Documentation

◆ append() [1/3]

void mrpt::poses::SE_average< 3 >::append ( const mrpt::math::TPose3D p,
const double  weight 
)

◆ append() [2/3]

void mrpt::poses::SE_average< 3 >::append ( const mrpt::poses::CPose3D p)

Adds a new pose to the computation.

See also
get_average

Referenced by mrpt::poses::CPose3DPDFParticles::getMean(), and mrpt::poses::CPose3DPDFSOG::getMean().

◆ append() [3/3]

void mrpt::poses::SE_average< 3 >::append ( const mrpt::poses::CPose3D p,
const double  weight 
)

Adds a new pose to the weighted-average computation.

See also
get_average

◆ clear()

void mrpt::poses::SE_average< 3 >::clear ( )

Resets the accumulator.

◆ get_average()

void mrpt::poses::SE_average< 3 >::get_average ( mrpt::poses::CPose3D out_mean) const

Returns the average pose.

Exceptions
std::logic_errorIf no data point were inserted.
std::runtime_errorUpon undeterminate average value (ie the average lays exactly on the origin point) and enable_exception_on_undeterminate is set to true (otherwise, the 0 orientation would be returned)
See also
append

Referenced by mrpt::poses::CPose3DPDFParticles::getMean(), and mrpt::poses::CPose3DPDFSOG::getMean().

Member Data Documentation

◆ enable_exception_on_undeterminate

bool mrpt::poses::SE_average< 3 >::enable_exception_on_undeterminate

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

Definition at line 182 of file SO_SE_average.h.

◆ m_accum_x

double mrpt::poses::SE_average< 3 >::m_accum_x
private

Definition at line 186 of file SO_SE_average.h.

◆ m_accum_y

double mrpt::poses::SE_average< 3 >::m_accum_y
private

Definition at line 186 of file SO_SE_average.h.

◆ m_accum_z

double mrpt::poses::SE_average< 3 >::m_accum_z
private

Definition at line 186 of file SO_SE_average.h.

◆ m_count

double mrpt::poses::SE_average< 3 >::m_count
private

Definition at line 185 of file SO_SE_average.h.

◆ m_rot_part

SO_average<3> mrpt::poses::SE_average< 3 >::m_rot_part
private

Definition at line 187 of file SO_SE_average.h.




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST