Loading...
Searching...
No Matches
gtsam::Rot2 Class Reference
Geometry

## Detailed Description

Rotation matrix NOTE: the angle theta is in radians unless explicitly stated.

Inheritance diagram for gtsam::Rot2:

## Standard Interface

class | boost::serialization::access
| Serialization function.
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
Matrix2 | matrix () const
| return 2*2 rotation matrix
Matrix2 | transpose () const
| return 2*2 transpose (inverse) rotation matrix
static Rot2 | ClosestTo (const Matrix2 &M)
| Find closest valid rotation matrix, given a 2x2 matrix.

## Constructors and named constructors

| Rot2 ()
| default constructor, zero rotation
| Rot2 (const Rot2 &r)
| copy constructor
| 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, OptionalJacobian< 1, 2 > H=boost::none)
| Named constructor with derivative Calculate relative bearing to a landmark in local coordinate frame.
static Rot2 | atan2 (double y, double x)
| Named constructor that behaves as atan2, i.e., y,x order (!) and normalizes.
static Rot2 | Random (std::mt19937 &rng)
| Random, generates random angle \(\in\) [-pi,pi] Example: std::mt19937 engine(42); Unit3 unit = Unit3::Random(engine);.

## 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

Rot2 | inverse () const
| The inverse rotation - negative angle.
Rot2 | operator* (const Rot2 &R) const
| Compose - make a new rotation by adding angles.
static Rot2 | Identity ()
| Identity.

## Lie Group

Matrix1 | AdjointMap () const
| Calculate Adjoint map.
static Rot2 | Expmap (const Vector1 &v, ChartJacobian H=boost::none)
| Exponential map at identity - create a rotation from canonical coordinates.
static Vector1 | Logmap (const Rot2 &r, ChartJacobian H=boost::none)
| Log map at identity - return the canonical coordinates of this rotation.
static Matrix | ExpmapDerivative (const Vector &)
| Left-trivialized derivative of the exponential map.
static Matrix | LogmapDerivative (const Vector &)
| Left-trivialized derivative inverse of the exponential map.

## Group Action on Point2

Point2 | rotate (const Point2 &p, OptionalJacobian< 2, 1 > H1=boost::none, OptionalJacobian< 2, 2 > 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, OptionalJacobian< 2, 1 > H1=boost::none, OptionalJacobian< 2, 2 > H2=boost::none) const
| rotate point from world to rotated frame \( p^c = (R_c^w)^T p^w \)

## Classes

struct | ChartAtOrigin

## Additional Inherited Members

Public Member Functions inherited from gtsam::LieGroup< Rot2, 1 >
SOn | compose (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
SOn | between (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
GTSAM_EXPORT SOn | compose (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
GTSAM_EXPORT SOn | between (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
const Rot2 & | derived () const
Rot2 | inverse (ChartJacobian H) const
Rot2 | expmap (const TangentVector &v) const
| expmap as required by manifold concept Applies exponential map to v and composes with *this
TangentVector | logmap (const Rot2 &g) const
| logmap as required by manifold concept Applies logarithmic map to group element that takes *this to g
Rot2 | retract (const TangentVector &v) const
| retract as required by manifold concept: applies v at *this
TangentVector | localCoordinates (const Rot2 &g) const
| localCoordinates as required by manifold concept: finds tangent vector between *this and g
Static Public Member Functions inherited from gtsam::LieGroup< Rot2, 1 >
static Rot2 | Retract (const TangentVector &v)
| Retract at origin: possible in Lie group because it has an identity.
static TangentVector | LocalCoordinates (const Rot2 &g)
| LocalCoordinates at origin: possible in Lie group because it has an identity.
Public Types inherited from gtsam::LieGroup< Rot2, 1 >
enum |
typedef OptionalJacobian< N, N > | ChartJacobian
typedef Eigen::Matrix< double, N, N > | Jacobian
typedef Eigen::Matrix< double, N, 1 > | TangentVector

## Member Function Documentation

## relativeBearing()

Rot2 gtsam::Rot2::relativeBearing | ( | const Point2 & | d,
|  | OptionalJacobian< 1, 2 > | H = boost::none )

static

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

Parameters

  d | 2D location of landmark
  H | optional reference for Jacobian

Returns
  2D rotation \( \in SO(2) \)

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

- /build/gtsam-gchP9J/gtsam-4.2.2+dfsg/gtsam/geometry/Rot2.h
- /build/gtsam-gchP9J/gtsam-4.2.2+dfsg/gtsam/geometry/Rot2.cpp