g2o
Loading...
Searching...
No Matches
Public Member Functions | List of all members
g2o::RobustKernelDCS Class Reference

Dynamic covariance scaling - DCS. More...

#include <robust_kernel_impl.h>

Inheritance diagram for g2o::RobustKernelDCS:
Inheritance graph
[legend]
Collaboration diagram for g2o::RobustKernelDCS:
Collaboration graph
[legend]

Public Member Functions

virtual void robustify (double e2, Vector3 &rho) const
 
- Public Member Functions inherited from g2o::RobustKernel
 RobustKernel ()
 
 RobustKernel (double delta)
 
virtual ~RobustKernel ()
 
virtual void setDelta (double delta)
 
double delta () const
 

Additional Inherited Members

- Protected Attributes inherited from g2o::RobustKernel
double _delta
 

Detailed Description

Dynamic covariance scaling - DCS.

See paper Robust Map Optimization from Agarwal et al. ICRA 2013

delta is used as $phi$

Definition at line 190 of file robust_kernel_impl.h.

Member Function Documentation

◆ robustify()

void g2o::RobustKernelDCS::robustify ( double  squaredError,
Vector3 rho 
) const
virtual

compute the scaling factor for a error: The error is e^T Omega e The output rho is rho[0]: The actual scaled error value rho[1]: First derivative of the scaling function rho[2]: Second derivative of the scaling function

Implements g2o::RobustKernel.

Definition at line 155 of file robust_kernel_impl.cpp.

155 {
156 const double& phi = _delta;
157 double scale = (2.0 * phi) / (phi + e2);
158 if (scale >= 1.0) { // limit scale to max of 1 and return this
159 rho[0] = e2;
160 rho[1] = 1.;
161 rho[2] = 0;
162 } else {
163 double phi_sqr = phi * phi;
164 rho[0] = scale * e2 * scale;
165 rho[1] = (4 * phi_sqr * (phi - e2)) / std::pow(phi + e2, 3);
166 rho[2] = -(8 * phi_sqr * (2 * phi - e2)) / std::pow(phi + e2, 4);
167 }
168}

References g2o::RobustKernel::_delta.


The documentation for this class was generated from the following files: