javaslam.slam
Class ExampleModel.MotionModel

java.lang.Object
  |
  +--javaslam.slam.ExampleModel.MotionModel
All Implemented Interfaces:
ExtendedVectorFunction, NoisyVectorFunction, VectorFunction
Enclosing class:
ExampleModel

public class ExampleModel.MotionModel
extends Object
implements NoisyVectorFunction, ExtendedVectorFunction

The motion model of the robot. The control specifies a desired translational and rotational velocity.


Field Summary
protected static int HEADING
           
protected static int INPUT_DIM
          The input dimension of the motion model.
protected static int OUTPUT_DIM
          The output dimension of the motion model.
protected static int RVEL
           
protected static int RVEL_ABS_NOISE
           
protected static int RVEL_REL_NOISE
           
protected  double rVelCtrl
          The current rotational velocity control (in radians per second).
protected static int TVEL
           
protected static int TVEL_ABS_NOISE
           
protected static int TVEL_REL_NOISE
           
protected  double tVelCtrl
          The current translational velocity control (in meters per second).
protected static int XPOS
           
protected static int YPOS
           
 
Constructor Summary
ExampleModel.MotionModel(double[] c)
          Constructor.
 
Method Summary
 double[] evaluate(double[] input)
          Evaluates this function at the supplied input.
 int getInputDim()
          Returns the input dimension of this function.
 Gaussian getNoiseModel()
          Returns the distribution over the noise variables for this motion model.
 int getOutputDim()
          Returns the output dimension of this function.
 double[][] jacobian(double[] input)
          Evaluates the Jacobian of this function at the supplied input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tVelCtrl

protected double tVelCtrl
The current translational velocity control (in meters per second).


rVelCtrl

protected double rVelCtrl
The current rotational velocity control (in radians per second).


INPUT_DIM

protected static final int INPUT_DIM
The input dimension of the motion model.

See Also:
Constant Field Values

OUTPUT_DIM

protected static final int OUTPUT_DIM
The output dimension of the motion model.

See Also:
Constant Field Values

XPOS

protected static final int XPOS
See Also:
Constant Field Values

YPOS

protected static final int YPOS
See Also:
Constant Field Values

HEADING

protected static final int HEADING
See Also:
Constant Field Values

TVEL

protected static final int TVEL
See Also:
Constant Field Values

RVEL

protected static final int RVEL
See Also:
Constant Field Values

TVEL_REL_NOISE

protected static final int TVEL_REL_NOISE
See Also:
Constant Field Values

TVEL_ABS_NOISE

protected static final int TVEL_ABS_NOISE
See Also:
Constant Field Values

RVEL_REL_NOISE

protected static final int RVEL_REL_NOISE
See Also:
Constant Field Values

RVEL_ABS_NOISE

protected static final int RVEL_ABS_NOISE
See Also:
Constant Field Values
Constructor Detail

ExampleModel.MotionModel

public ExampleModel.MotionModel(double[] c)
Constructor.

Parameters:
c - the control signal; c[0] is the translational velocity (in meters/second) and c[1] is the rotational velocity (in radians/second)
Method Detail

getInputDim

public int getInputDim()
Returns the input dimension of this function.

Specified by:
getInputDim in interface VectorFunction

getOutputDim

public int getOutputDim()
Returns the output dimension of this function.

Specified by:
getOutputDim in interface VectorFunction

evaluate

public double[] evaluate(double[] input)
Evaluates this function at the supplied input.

Specified by:
evaluate in interface VectorFunction
Parameters:
input - a vector with getInputDim() elements
Returns:
a vector with getOutputDim() elements

jacobian

public double[][] jacobian(double[] input)
Evaluates the Jacobian of this function at the supplied input.

Specified by:
jacobian in interface ExtendedVectorFunction
Parameters:
input - a vector with getInputDim() elements
Returns:
a matrix with getOutputDim() rows and getInputDim() columns; if y = f(x) then element (i, j) is the partial derivative of yi with respect to xj at input

getNoiseModel

public Gaussian getNoiseModel()
Returns the distribution over the noise variables for this motion model.

Specified by:
getNoiseModel in interface NoisyVectorFunction
Returns:
the Gaussian distribution over the noise input