MRPT
2.0.4
|
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.
Definition at line 157 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 {false} |
(Default=false) Set to true if you want to raise an exception on undetermined average values. More... | |
Private Attributes | |
double | m_count {0} |
double | m_accum_x {0} |
double | m_accum_y {0} |
double | m_accum_z {0} |
SO_average< 3 > | m_rot_part |
mrpt::poses::SE_average< 3 >::SE_average | ( | ) |
Constructor.
void mrpt::poses::SE_average< 3 >::append | ( | const mrpt::poses::CPose3D & | p | ) |
Adds a new pose to the computation.
Referenced by mrpt::poses::CPose3DPDFGrid::getMean(), mrpt::poses::CPose3DPDFParticles::getMean(), and mrpt::poses::CPose3DPDFSOG::getMean().
void mrpt::poses::SE_average< 3 >::append | ( | const mrpt::poses::CPose3D & | p, |
const double | weight | ||
) |
Adds a new pose to the weighted-average computation.
void mrpt::poses::SE_average< 3 >::append | ( | const mrpt::math::TPose3D & | p, |
const double | weight | ||
) |
void mrpt::poses::SE_average< 3 >::clear | ( | ) |
Resets the accumulator.
void mrpt::poses::SE_average< 3 >::get_average | ( | mrpt::poses::CPose3D & | out_mean | ) | const |
Returns the average pose.
std::logic_error | If no data point were inserted. |
std::runtime_error | Upon 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) |
Referenced by mrpt::poses::CPose3DPDFGrid::getMean(), mrpt::poses::CPose3DPDFParticles::getMean(), and mrpt::poses::CPose3DPDFSOG::getMean().
bool mrpt::poses::SE_average< 3 >::enable_exception_on_undeterminate {false} |
(Default=false) Set to true if you want to raise an exception on undetermined average values.
Definition at line 179 of file SO_SE_average.h.
|
private |
Definition at line 183 of file SO_SE_average.h.
|
private |
Definition at line 183 of file SO_SE_average.h.
|
private |
Definition at line 183 of file SO_SE_average.h.
|
private |
Definition at line 182 of file SO_SE_average.h.
|
private |
Definition at line 184 of file SO_SE_average.h.
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |