50 Base(model, posekey, biaskey), measured_(measured) {
59 std::cout << s <<
"BiasedGPSFactor(" 60 << keyFormatter(this->
key1()) <<
"," 61 << keyFormatter(this->
key2()) <<
")\n" 62 <<
" measured: " << measured_.transpose() << std::endl;
68 const This *
e =
dynamic_cast<const This*
> (&
expected);
76 boost::optional<Matrix&> H1 = boost::none, boost::optional<Matrix&> H2 =
77 boost::none)
const override {
83 (*H2) << Matrix3::Identity();
97 template<
class ARCHIVE>
99 ar & boost::serialization::make_nvp(
"NoiseModelFactor2",
100 boost::serialization::base_object<Base>(*
this));
101 ar & BOOST_SERIALIZATION_NVP(measured_);
bool equals(const NonlinearFactor &f, double tol=1e-9) const override
noiseModel::Diagonal::shared_ptr model
boost::shared_ptr< BiasedGPSFactor > shared_ptr
const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get translation
friend class boost::serialization::access
BiasedGPSFactor(Key posekey, Key biaskey, const Point3 measured, const SharedNoiseModel &model)
static const KeyFormatter DefaultKeyFormatter
NoiseModelFactor2< Pose3, Point3 > Base
void print(const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
bool equals(const NonlinearFactor &expected, double tol=1e-9) const override
static const Pose3 pose(Rot3(Vector3(1,-1,-1).asDiagonal()), Point3(0, 0, 0.5))
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const Point3 measured() const
SharedNoiseModel noiseModel_
Vector evaluateError(const Pose3 &pose, const Point3 &bias, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const override
Non-linear factor base classes.
std::uint64_t Key
Integer nonlinear key type.
~BiasedGPSFactor() override
void serialize(ARCHIVE &ar, const unsigned int)
noiseModel::Base::shared_ptr SharedNoiseModel
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get rotation