MRPT
2.0.1
|
Computes weighted and un-weighted averages of SO(2) 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(2) manifolds is computed by averaging the corresponding 2D points, then projecting the result back to the closest-point in the manifold. Shortly explained in these slides
Definition at line 41 of file SO_SE_average.h.
#include <mrpt/poses/SO_SE_average.h>
Public Member Functions | |
SO_average () | |
Constructor. More... | |
void | clear () |
Resets the accumulator. More... | |
void | append (const double orientation_rad) |
Adds a new orientation (radians) to the computation. More... | |
void | append (const double orientation_rad, const double weight) |
Adds a new orientation (radians) to the weighted-average computation. More... | |
double | get_average () const |
Returns the average orientation (radians). 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} |
mrpt::poses::SO_average< 2 >::SO_average | ( | ) |
Constructor.
void mrpt::poses::SO_average< 2 >::append | ( | const double | orientation_rad | ) |
Adds a new orientation (radians) to the computation.
Referenced by run_test_so2_avrg().
void mrpt::poses::SO_average< 2 >::append | ( | const double | orientation_rad, |
const double | weight | ||
) |
Adds a new orientation (radians) to the weighted-average computation.
void mrpt::poses::SO_average< 2 >::clear | ( | ) |
Resets the accumulator.
double mrpt::poses::SO_average< 2 >::get_average | ( | ) | const |
Returns the average orientation (radians).
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 run_test_so2_avrg().
bool mrpt::poses::SO_average< 2 >::enable_exception_on_undeterminate {false} |
(Default=false) Set to true if you want to raise an exception on undetermined average values.
Definition at line 63 of file SO_SE_average.h.
|
private |
Definition at line 67 of file SO_SE_average.h.
|
private |
Definition at line 67 of file SO_SE_average.h.
|
private |
Definition at line 66 of file SO_SE_average.h.
Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020 |