26 template <
typename A1,
typename A2>
34 template <
typename A1,
typename A2 = A1,
typename T =
double>
63 boost::optional<Matrix&> H1 = boost::none,
64 boost::optional<Matrix&> H2 = boost::none)
const 66 std::vector<Matrix> Hs(2);
77 void print(
const std::string&
s =
"",
79 std::cout <<
s <<
"RangeFactor" << std::endl;
85 template <
class ARCHIVE>
87 ar& boost::serialization::make_nvp(
88 "Base", boost::serialization::base_object<Base>(*
this));
93 template <
typename A1,
typename A2,
typename T>
95 :
public Testable<RangeFactor<A1, A2, T> > {};
101 template <
typename A1,
typename A2 = A1,
116 const A1& body_T_sensor)
140 boost::optional<Matrix&> H1 = boost::none,
141 boost::optional<Matrix&> H2 = boost::none)
const 143 std::vector<Matrix> Hs(2);
156 std::cout <<
s <<
"RangeFactorWithTransform" << std::endl;
157 this->body_T_sensor_.print(
" sensor pose in body frame: ");
163 friend class boost::serialization::access;
164 template <
typename ARCHIVE>
169 ar& BOOST_SERIALIZATION_NVP(body_T_sensor_);
170 ar& boost::serialization::make_nvp(
171 "Base", boost::serialization::base_object<Base>(*
this));
176 template <
typename A1,
typename A2,
typename T>
178 :
public Testable<RangeFactorWithTransform<A1, A2, T> > {};
const T & measured() const
double error(const Values &c) const override
gtsam::NonlinearFactor::shared_ptr clone() const override
std::array< Key, NARY_EXPRESSION_SIZE > ArrayNKeys
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print relies on Testable traits being defined for T
Expression< T > expression() const override
Return an expression that predicts the measurement given Values.
noiseModel::Diagonal::shared_ptr model
void print(const std::string &s="", const KeyFormatter &kf=DefaultKeyFormatter) const override
print
Expression< T > expression(const typename Base::ArrayNKeys &keys) const override
void initialize(const Expression< T > &expression)
Initialize with constructor arguments.
Vector unwhitenedError(const Values &x, boost::optional< std::vector< Matrix > & > H=boost::none) const override
static const KeyFormatter DefaultKeyFormatter
const Symbol key1('v', 1)
RangeFactor(Key key1, Key key2, T measured, const SharedNoiseModel &model)
boost::shared_ptr< This > shared_ptr
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
void serialize(ARCHIVE &ar, const unsigned int)
Vector evaluateError(const A1 &a1, const A2 &a2, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
RangeFactor< A1, A2 > This
pair< size_t, size_t > Range
GenericValue< T > genericValue(const T &v)
const KeyVector & keys() const
Access the factor's involved variable keys.
const Symbol key2('v', 2)
RangeFactor()
default constructor
friend class boost::serialization::access
std::uint64_t Key
Integer nonlinear key type.
ExpressionFactorN< T, A1, A2 > Base
noiseModel::Base::shared_ptr SharedNoiseModel