gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gtsam::Rot2 Class Reference
+ Inheritance diagram for gtsam::Rot2:

Constructors and named constructors

 Rot2 ()
 default constructor, zero rotation
 
 Rot2 (double theta)
 Constructor from angle in radians == exponential map at identity.
 
static Rot2 fromAngle (double theta)
 Named constructor from angle in radians.
 
static Rot2 fromDegrees (double theta)
 Named constructor from angle in degrees.
 
static Rot2 fromCosSin (double c, double s)
 Named constructor from cos(theta),sin(theta) pair, will not normalize!
 
static Rot2 relativeBearing (const Point2 &d, boost::optional< Matrix & > H=boost::none)
 Named constructor with derivative Calculate relative bearing to a landmark in local coordinate frame. More...
 
static Rot2 atan2 (double y, double x)
 Named constructor that behaves as atan2, i.e., y,x order (!) and normalizes.
 

Group

Rot2 inverse () const
 The inverse rotation - negative angle.
 
Rot2 compose (const Rot2 &R, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
 Compose - make a new rotation by adding angles.
 
Rot2 operator* (const Rot2 &R) const
 Compose - make a new rotation by adding angles.
 
Rot2 between (const Rot2 &R, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
 Between using the default implementation.
 
static Rot2 identity ()
 identity
 

Manifold

size_t dim () const
 Dimensionality of the tangent space, DOF = 1.
 
Rot2 retract (const Vector &v) const
 Updates a with tangent space delta.
 
Vector localCoordinates (const Rot2 &t2) const
 Returns inverse retraction.
 
static size_t Dim ()
 dimension of the variable - used to autodetect sizes
 

Advanced Interface

class boost::serialization::access
 Serialization function.
 

Public Member Functions

Testable
void print (const std::string &s="theta") const
 print
 
bool equals (const Rot2 &R, double tol=1e-9) const
 equals with an tolerance
 
Group Action on Point2
Point2 rotate (const Point2 &p, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
 rotate point from rotated coordinate frame to world \( p^w = R_c^w p^c \)
 
Point2 operator* (const Point2 &p) const
 syntactic sugar for rotate
 
Point2 unrotate (const Point2 &p, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
 rotate point from world to rotated frame \( p^c = (R_c^w)^T p^w \)
 
Standard Interface
Point2 unit () const
 Creates a unit vector as a Point2.
 
double theta () const
 return angle (RADIANS)
 
double degrees () const
 return angle (DEGREES)
 
double c () const
 return cos
 
double s () const
 return sin
 
Matrix matrix () const
 return 2*2 rotation matrix
 
Matrix transpose () const
 return 2*2 transpose (inverse) rotation matrix
 
- Public Member Functions inherited from gtsam::DerivedValue< Rot2 >
virtual Valueclone_ () const
 Create a duplicate object returned as a pointer to the generic Value interface. More...
 
virtual void deallocate_ () const
 Destroy and deallocate this object, only if it was originally allocated using clone_().
 
virtual boost::shared_ptr< Valueclone () const
 Clone this value (normal clone on the heap, delete with 'delete' operator)
 
virtual bool equals_ (const Value &p, double tol=1e-9) const
 equals implementing generic Value interface
 
virtual Valueretract_ (const Vector &delta) const
 Generic Value interface version of retract.
 
virtual Vector localCoordinates_ (const Value &value2) const
 Generic Value interface version of localCoordinates.
 
virtual Valueoperator= (const Value &rhs)
 Assignment operator.
 
 operator const Rot2 & () const
 Conversion to the derived class.
 
 operator Rot2 & ()
 Conversion to the derived class.
 
- Public Member Functions inherited from gtsam::Value
virtual ~Value ()
 Virutal destructor.
 

Static Public Member Functions

Lie Group
static Rot2 Expmap (const Vector &v)
 Exponential map at identity - create a rotation from canonical coordinates.
 
static Vector Logmap (const Rot2 &r)
 Log map at identity - return the canonical coordinates of this rotation.
 

Static Public Attributes

static const size_t dimension = 1
 get the dimension by the type
 

Additional Inherited Members

- Protected Member Functions inherited from gtsam::DerivedValue< Rot2 >
DerivedValue< Rot2 > & operator= (const DerivedValue< Rot2 > &rhs)
 Assignment operator, protected because only the Value or DERIVED assignment operators should be used. More...
 

Member Function Documentation

Rot2 gtsam::Rot2::relativeBearing ( const Point2 d,
boost::optional< Matrix & >  H = boost::none 
)
static

Named constructor with derivative Calculate relative bearing to a landmark in local coordinate frame.

Parameters
d2D location of landmark
Hoptional reference for Jacobian
Returns
2D rotation \( \in SO(2) \)

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