use auto instead
parent
200aa13701
commit
319342ab89
|
@ -49,8 +49,8 @@ TEST( Rot3AttitudeFactor, Constructor ) {
|
||||||
Rot3 nRb;
|
Rot3 nRb;
|
||||||
EXPECT(assert_equal((Vector) Z_2x1,factor.evaluateError(nRb),1e-5));
|
EXPECT(assert_equal((Vector) Z_2x1,factor.evaluateError(nRb),1e-5));
|
||||||
|
|
||||||
std::function<Vector(const Rot3&)> err_fn = [&factor](const Rot3& r){
|
auto err_fn = [&factor](const Rot3& r){
|
||||||
return factor.evaluateError(r, OptionalNone);
|
return factor.evaluateError(r, OptionalNone);
|
||||||
};
|
};
|
||||||
// Calculate numerical derivatives
|
// Calculate numerical derivatives
|
||||||
Matrix expectedH = numericalDerivative11<Vector, Rot3>(err_fn, nRb);
|
Matrix expectedH = numericalDerivative11<Vector, Rot3>(err_fn, nRb);
|
||||||
|
|
|
@ -140,7 +140,7 @@ TEST( OrientedPlane3Factor, Derivatives ) {
|
||||||
OrientedPlane3Factor factor(p.planeCoefficients(), noise, poseKey, planeKey);
|
OrientedPlane3Factor factor(p.planeCoefficients(), noise, poseKey, planeKey);
|
||||||
|
|
||||||
// Calculate numerical derivatives
|
// Calculate numerical derivatives
|
||||||
std::function<Vector(const Pose3&, const OrientedPlane3&)> f = [&factor](const Pose3& p, const OrientedPlane3& o) {
|
auto f = [&factor](const Pose3& p, const OrientedPlane3& o) {
|
||||||
return factor.evaluateError(p, o);
|
return factor.evaluateError(p, o);
|
||||||
};
|
};
|
||||||
Matrix numericalH1 = numericalDerivative21<Vector, Pose3, OrientedPlane3>(f, poseLin, pLin);
|
Matrix numericalH1 = numericalDerivative21<Vector, Pose3, OrientedPlane3>(f, poseLin, pLin);
|
||||||
|
|
Loading…
Reference in New Issue