NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION > Class Template Reference

#include <loc_projection_factor.h>

Inheritance diagram for gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >:
Inheritance graph

Public Types

typedef NoiseModelFactor1< POSE > Base
 shorthand for base class type More...
 
typedef LocProjectionFactor< POSE, LANDMARK, CALIBRATION > This
 shorthand for this class More...
 
typedef boost::shared_ptr< Thisshared_ptr
 shorthand for a smart pointer to a factor More...
 

Public Member Functions

 LocProjectionFactor ()
 Default constructor. More...
 
 LocProjectionFactor (const Point2 &measured, const LANDMARK &landmark_point, const SharedNoiseModel &model, Key poseKey, const boost::shared_ptr< CALIBRATION > &K, boost::optional< POSE > body_P_sensor=boost::none)
 
 LocProjectionFactor (const Point2 &measured, const LANDMARK &landmark_point, const SharedNoiseModel &model, Key poseKey, const boost::shared_ptr< CALIBRATION > &K, bool throwCheirality, bool verboseCheirality, boost::optional< POSE > body_P_sensor=boost::none)
 
virtual ~LocProjectionFactor ()
 
virtual NonlinearFactor::shared_ptr clone () const
 
void print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 
virtual bool equals (const NonlinearFactor &p, double tol=1e-9) const
 equals More...
 
Vector evaluateError (const Pose3 &pose, boost::optional< Matrix & > H1=boost::none) const
 Evaluate error h(x)-z and optionally derivatives. More...
 
bool cheiralityError (const Pose3 &pose) const
 
const Point2 & measured () const
 
const LANDMARK & landmark_point () const
 
LANDMARK & landmark_point ()
 
const boost::shared_ptr< CALIBRATION > calibration () const
 
bool verboseCheirality () const
 
bool throwCheirality () const
 
boost::optional< POSE > body_P_sensor () const
 

Protected Attributes

Point2 measured_
 2D measurement More...
 
LANDMARK landmark_point_
 Landmark point. More...
 
boost::shared_ptr< CALIBRATION > K_
 shared pointer to calibration object More...
 
boost::optional< POSE > body_P_sensor_
 The pose of the sensor in the body frame. More...
 
bool throwCheirality_
 
bool verboseCheirality_
 

Friends

class boost::serialization::access
 Serialization function. More...
 

Detailed Description

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
class gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >

Non-linear factor for a constraint derived from a 2D measurement. The calibration and landmark point are known here. Adapted from gtsam GenericProjectionFactor.

Member Typedef Documentation

◆ Base

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
typedef NoiseModelFactor1<POSE> gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::Base

shorthand for base class type

◆ shared_ptr

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
typedef boost::shared_ptr<This> gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::shared_ptr

shorthand for a smart pointer to a factor

◆ This

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
typedef LocProjectionFactor<POSE, LANDMARK, CALIBRATION> gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::This

shorthand for this class

Constructor & Destructor Documentation

◆ LocProjectionFactor() [1/3]

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::LocProjectionFactor ( )
inline

Default constructor.

◆ LocProjectionFactor() [2/3]

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::LocProjectionFactor ( const Point2 &  measured,
const LANDMARK &  landmark_point,
const SharedNoiseModel &  model,
Key  poseKey,
const boost::shared_ptr< CALIBRATION > &  K,
boost::optional< POSE >  body_P_sensor = boost::none 
)
inline

Constructor

Parameters
measuredis the 2 dimensional location of point in image (the measurement)
modelis the standard deviation
poseKeyis the index of the camera
pointKeyis the index of the landmark
Kshared pointer to the constant calibration
body_P_sensoris the transform from body to sensor frame (default identity)

◆ LocProjectionFactor() [3/3]

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::LocProjectionFactor ( const Point2 &  measured,
const LANDMARK &  landmark_point,
const SharedNoiseModel &  model,
Key  poseKey,
const boost::shared_ptr< CALIBRATION > &  K,
bool  throwCheirality,
bool  verboseCheirality,
boost::optional< POSE >  body_P_sensor = boost::none 
)
inline

Constructor with exception-handling flags

Parameters
measuredis the 2 dimensional location of point in image (the measurement)
modelis the standard deviation
poseKeyis the index of the camera
pointKeyis the index of the landmark
Kshared pointer to the constant calibration
throwCheiralitydetermines whether Cheirality exceptions are rethrown
verboseCheiralitydetermines whether exceptions are printed for Cheirality
body_P_sensoris the transform from body to sensor frame (default identity)

◆ ~LocProjectionFactor()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
virtual gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::~LocProjectionFactor ( )
inlinevirtual

Virtual destructor

Member Function Documentation

◆ body_P_sensor()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
boost::optional<POSE> gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::body_P_sensor ( ) const
inline

◆ calibration()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
const boost::shared_ptr<CALIBRATION> gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::calibration ( ) const
inline

return the calibration object

◆ cheiralityError()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
bool gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::cheiralityError ( const Pose3 &  pose) const
inline

◆ clone()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
virtual NonlinearFactor::shared_ptr gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::clone ( ) const
inlinevirtual
Returns
a deep copy of this factor

◆ equals()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
virtual bool gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::equals ( const NonlinearFactor &  p,
double  tol = 1e-9 
) const
inlinevirtual

equals

◆ evaluateError()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
Vector gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::evaluateError ( const Pose3 &  pose,
boost::optional< Matrix & >  H1 = boost::none 
) const
inline

Evaluate error h(x)-z and optionally derivatives.

◆ landmark_point() [1/2]

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
LANDMARK& gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::landmark_point ( )
inline

◆ landmark_point() [2/2]

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
const LANDMARK& gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::landmark_point ( ) const
inline

◆ measured()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
const Point2& gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::measured ( ) const
inline

return the measurement

◆ print()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
void gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::print ( const std::string &  s = "",
const KeyFormatter &  keyFormatter = DefaultKeyFormatter 
) const
inline

print

Parameters
soptional string naming the factor
keyFormatteroptional formatter useful for printing Symbols

◆ throwCheirality()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
bool gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::throwCheirality ( ) const
inline

return flag for throwing cheirality exceptions

◆ verboseCheirality()

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
bool gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::verboseCheirality ( ) const
inline

return verbosity

Friends And Related Function Documentation

◆ boost::serialization::access

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
friend class boost::serialization::access
friend

Serialization function.

Member Data Documentation

◆ body_P_sensor_

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
boost::optional<POSE> gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::body_P_sensor_
protected

The pose of the sensor in the body frame.

◆ K_

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
boost::shared_ptr<CALIBRATION> gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::K_
protected

shared pointer to calibration object

◆ landmark_point_

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
LANDMARK gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::landmark_point_
protected

Landmark point.

◆ measured_

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
Point2 gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::measured_
protected

2D measurement

◆ throwCheirality_

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
bool gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::throwCheirality_
protected

If true, rethrows Cheirality exceptions (default: false)

◆ verboseCheirality_

template<class POSE = Pose3, class LANDMARK = Point3, class CALIBRATION = Cal3_S2>
bool gtsam::LocProjectionFactor< POSE, LANDMARK, CALIBRATION >::verboseCheirality_
protected

If true, prints text for Cheirality exceptions (default: false)


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