Public Member Functions | Protected Attributes | List of all members
gtsam::AttitudeFactor Class Reference

Base class for an attitude factor that constrains the rotation between body and navigation frames. More...

#include <AttitudeFactor.h>

Inheritance diagram for gtsam::AttitudeFactor:
Inheritance graph
[legend]

Public Member Functions

Vector attitudeError (const Rot3 &p, OptionalJacobian< 2, 3 > H={}) const
 
 AttitudeFactor ()
 
 AttitudeFactor (const Unit3 &nRef, const Unit3 &bMeasured=Unit3(0, 0, 1))
 Constructor. More...
 
const Unit3bMeasured () const
 
const Unit3nRef () const
 

Protected Attributes

Unit3 bMeasured_
 Position measurement in. More...
 
Unit3 nRef_
 

Detailed Description

Base class for an attitude factor that constrains the rotation between body and navigation frames.

This factor enforces that when the measured direction in the body frame (e.g., from an IMU accelerometer) is rotated into the navigation frame using the rotation variable, it should align with a known reference direction in the navigation frame (e.g., gravity vector).

Mathematically, the error is zero when: nRb * bMeasured == nRef

This is useful for incorporating absolute orientation measurements into the factor graph.

Definition at line 45 of file AttitudeFactor.h.

Constructor & Destructor Documentation

◆ AttitudeFactor() [1/2]

gtsam::AttitudeFactor::AttitudeFactor ( )
inline

default constructor - only use for serialization

Definition at line 51 of file AttitudeFactor.h.

◆ AttitudeFactor() [2/2]

gtsam::AttitudeFactor::AttitudeFactor ( const Unit3 nRef,
const Unit3 bMeasured = Unit3(0, 0, 1) 
)
inline

Constructor.

Parameters
nRefReference direction in the navigation frame (e.g., gravity).
bMeasuredMeasured direction in the body frame (e.g., from IMU accelerometer). Default is Unit3(0, 0, 1).

Definition at line 59 of file AttitudeFactor.h.

Member Function Documentation

◆ attitudeError()

Vector gtsam::AttitudeFactor::attitudeError ( const Rot3 p,
OptionalJacobian< 2, 3 >  H = {} 
) const

vector of errors

Definition at line 26 of file AttitudeFactor.cpp.

◆ bMeasured()

const Unit3& gtsam::AttitudeFactor::bMeasured ( ) const
inline

Definition at line 66 of file AttitudeFactor.h.

◆ nRef()

const Unit3& gtsam::AttitudeFactor::nRef ( ) const
inline

Definition at line 65 of file AttitudeFactor.h.

Member Data Documentation

◆ bMeasured_

Unit3 gtsam::AttitudeFactor::bMeasured_
protected

Position measurement in.

Definition at line 47 of file AttitudeFactor.h.

◆ nRef_

Unit3 gtsam::AttitudeFactor::nRef_
protected

Definition at line 47 of file AttitudeFactor.h.


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


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:15:09