using using for boost placeholders in tests
parent
42c0eb6aad
commit
155fafabf2
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
#include "imuFactorTesting.h"
|
#include "imuFactorTesting.h"
|
||||||
|
|
||||||
|
using namespace boost::placeholders;
|
||||||
|
|
||||||
namespace testing {
|
namespace testing {
|
||||||
// Create default parameters with Z-down and above noise parameters
|
// Create default parameters with Z-down and above noise parameters
|
||||||
static boost::shared_ptr<PreintegrationParams> Params() {
|
static boost::shared_ptr<PreintegrationParams> Params() {
|
||||||
|
@ -98,9 +100,7 @@ TEST(ManifoldPreintegration, computeError) {
|
||||||
pim.computeError(x1, x2, bias, aH1, aH2, aH3);
|
pim.computeError(x1, x2, bias, aH1, aH2, aH3);
|
||||||
boost::function<Vector9(const NavState&, const NavState&,
|
boost::function<Vector9(const NavState&, const NavState&,
|
||||||
const imuBias::ConstantBias&)> f =
|
const imuBias::ConstantBias&)> f =
|
||||||
boost::bind(&ManifoldPreintegration::computeError, pim,
|
boost::bind(&ManifoldPreintegration::computeError, pim, _1, _2, _3,
|
||||||
boost::placeholders::_1, boost::placeholders::_2,
|
|
||||||
boost::placeholders::_3,
|
|
||||||
boost::none, boost::none, boost::none);
|
boost::none, boost::none, boost::none);
|
||||||
// NOTE(frank): tolerance of 1e-3 on H1 because approximate away from 0
|
// NOTE(frank): tolerance of 1e-3 on H1 because approximate away from 0
|
||||||
EXPECT(assert_equal(numericalDerivative31(f, x1, x2, bias), aH1, 1e-9));
|
EXPECT(assert_equal(numericalDerivative31(f, x1, x2, bias), aH1, 1e-9));
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
#include "imuFactorTesting.h"
|
#include "imuFactorTesting.h"
|
||||||
|
|
||||||
|
using namespace boost::placeholders;
|
||||||
|
|
||||||
static const double kDt = 0.1;
|
static const double kDt = 0.1;
|
||||||
|
|
||||||
Vector9 f(const Vector9& zeta, const Vector3& a, const Vector3& w) {
|
Vector9 f(const Vector9& zeta, const Vector3& a, const Vector3& w) {
|
||||||
|
@ -105,9 +107,7 @@ TEST(TangentPreintegration, computeError) {
|
||||||
pim.computeError(x1, x2, bias, aH1, aH2, aH3);
|
pim.computeError(x1, x2, bias, aH1, aH2, aH3);
|
||||||
boost::function<Vector9(const NavState&, const NavState&,
|
boost::function<Vector9(const NavState&, const NavState&,
|
||||||
const imuBias::ConstantBias&)> f =
|
const imuBias::ConstantBias&)> f =
|
||||||
boost::bind(&TangentPreintegration::computeError, pim,
|
boost::bind(&TangentPreintegration::computeError, pim, _1, _2, _3,
|
||||||
boost::placeholders::_1, boost::placeholders::_2,
|
|
||||||
boost::placeholders::_3,
|
|
||||||
boost::none, boost::none, boost::none);
|
boost::none, boost::none, boost::none);
|
||||||
// NOTE(frank): tolerance of 1e-3 on H1 because approximate away from 0
|
// NOTE(frank): tolerance of 1e-3 on H1 because approximate away from 0
|
||||||
EXPECT(assert_equal(numericalDerivative31(f, x1, x2, bias), aH1, 1e-9));
|
EXPECT(assert_equal(numericalDerivative31(f, x1, x2, bias), aH1, 1e-9));
|
||||||
|
|
Loading…
Reference in New Issue