# opentl::models::Motion Class Reference

Abstract class for object motion models. More...

Inherited by opentl::models::LinearARModels.

List of all members.

## Public Types
## Public Member Functions
virtual MotionType | getMotionType ()
| get motion type (see above)
virtual math::SquareMatrix & | getNoiseCovariance ()=0
| Get process noise covariance matrix.
virtual int | getNoiseDim ()=0
| Returns dimension of process noise square matrix.
virtual void | getUniformPrior (opentl::core::State &srcDstState)=0
| Function to get the first state prior for the tracking. The filter calls this function at initialization. Requires to call setNoiseCovariance() first to get range values for uniform distribution.
| Motion (MotionType motionType)
virtual void | predictMotion (opentl::core::State &srcDstState, bool addNoise=false, double deltaT=-1.0, math::SquareMatrix *noiseCovMat=NULL, math::SquareMatrix *jacStateTrans=NULL, math::Vector *inputU=NULL)=0
| Predicts state(k+1) based on specific motion model.
virtual void | setAveragePose (const math::Vector &averagePose)=0
| Set average pose value (used by some models with additive update).
virtual void | setDeltaT (double deltaT)
| Sets a fixed delta t (used if no one is provided at prediction time).
virtual void | setNoiseCovariance (const math::SquareMatrix &noiseCovMat)=0
| Set process noise covariance (needs to update matrices afterwards!).
virtual void | setUniformNoiseRange (const math::Vector &uniformNoiseRange)=0
| Set uniform noise range (for the initial prior).
virtual | ~Motion ()
## Protected Attributes
double | mDeltaT
| Use a fixed time value for deltaT (default: 1.0 sec).
bool | mDirtyFlag
| Dirty flag: if we change mDeltaT, then we need to update matrices.
MotionType | mMotionType
| motion type (see above)

## Detailed Description

Abstract class for object motion models.

Author:
  Claus Lenz, lenz@in.tum.de; Erwin Roth, erwin.roth@weihenstephan.org; Giorgio Panin, panin@in.tum.de

## Member Enumeration Documentation

enum opentl::models::Motion::MotionType

ENUM type specifying the motion type (useful for quickly knowing the number of state derivatives or replica).

Enumerator:

  BROWNIAN |
  CWNA |
  OSCILL |

## Constructor & Destructor Documentation

opentl::models::Motion::Motion | ( | MotionType | motionType | ) |

virtual opentl::models::Motion::~Motion | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual MotionType opentl::models::Motion::getMotionType | ( |  | ) | `[inline, virtual]`

get motion type (see above)

virtual math::SquareMatrix& opentl::models::Motion::getNoiseCovariance | ( |  | ) | `[pure virtual]`

Get process noise covariance matrix.

Implemented in opentl::models::LinearARModels.

virtual int opentl::models::Motion::getNoiseDim | ( |  | ) | `[pure virtual]`

Returns dimension of process noise square matrix.

Returns:
  Dimension of process noise

Implemented in opentl::models::LinearARModels.

virtual void opentl::models::Motion::getUniformPrior | ( | opentl::core::State & | srcDstState | ) | `[pure virtual]`

Function to get the first state prior for the tracking. The filter calls this function at initialization. Requires to call setNoiseCovariance() first to get range values for uniform distribution.

Parameters:

  | srcDstState | State used as basis for initialization of motion

Implemented in opentl::models::LinearARModels.

virtual void opentl::models::Motion::predictMotion | ( | opentl::core::State & | srcDstState,
|  | bool | addNoise = `false`,
|  | double | deltaT = `-1.0`,
|  | math::SquareMatrix * | noiseCovMat = `NULL`,
|  | math::SquareMatrix * | jacStateTrans = `NULL`,
|  | math::Vector * | inputU = `NULL` |
| ) |  |  | `[pure virtual]`

Predicts state(k+1) based on specific motion model.

Parameters:

  | srcDstState | Variable holding input and output state
  | addNoise | Optional: (default = false) if true, process noise will be added to state(k+1)
  | deltaT | Real time interval for the prediction [sec] (-1 = use fixed deltaT, internally set)
  | noiseCovMat | Gives access to (dynamic) process noise covariance matrix
  | jacStateTrans | Optional: returns Jacobian of state transition matrix (must be square)
  | inputU | Optional: input control vector (u)

Implemented in opentl::models::LinearARModels.

virtual void opentl::models::Motion::setAveragePose | ( | const math::Vector & | averagePose | ) | `[pure virtual]`

Set average pose value (used by some models with additive update).

Parameters:

  | averagePose | Input average pose vector

Implemented in opentl::models::LinearARModels.

virtual void opentl::models::Motion::setDeltaT | ( | double | deltaT | ) | `[inline, virtual]`

Sets a fixed delta t (used if no one is provided at prediction time).

Parameters:

  | deltaT | value of delta t

virtual void opentl::models::Motion::setNoiseCovariance | ( | const math::SquareMatrix & | noiseCovMat | ) | `[pure virtual]`

Set process noise covariance (needs to update matrices afterwards!).

Implemented in opentl::models::LinearARModels.

virtual void opentl::models::Motion::setUniformNoiseRange | ( | const math::Vector & | uniformNoiseRange | ) | `[pure virtual]`

Set uniform noise range (for the initial prior).

Parameters:

  | uniformNoiseRange | Input minimum and maximum values for the absolute pose parameters

Implemented in opentl::models::LinearARModels.

## Member Data Documentation

double opentl::models::Motion::mDeltaT`[protected]`

Use a fixed time value for deltaT (default: 1.0 sec).

bool opentl::models::Motion::mDirtyFlag`[protected]`

Dirty flag: if we change mDeltaT, then we need to update matrices.

MotionType opentl::models::Motion::mMotionType`[protected]`

motion type (see above)