javaslam.slam
Class ExampleModel

java.lang.Object
  |
  +--javaslam.slam.ExampleModel
All Implemented Interfaces:
Model

public class ExampleModel
extends Object
implements Model

A SLAM model for a robot that can rotate about its vertical axis and translate along its current heading and which receives differential odometry measurements and range-bearing landmark measurements.


Nested Class Summary
 class ExampleModel.InverseMeasurementModel
          The inverse landmark measurement model of the robot.
 class ExampleModel.LandmarkMeasurementModel
          The landmark measurement model of the robot.
 class ExampleModel.MotionModel
          The motion model of the robot.
 class ExampleModel.OdometryModel
          The odometry model of the robot.
 
Field Summary
protected static int LANDMARK_DIM
          The dimension of each landmark's state.
 ExampleModel.LandmarkMeasurementModel landmarkMeasurementModel
          The landmark measurement model.
protected  Gaussian landmarkNoiseModel
          A distribution over the noise variables of the landmark measurement model.
protected  Gaussian motionNoiseModel
          A distribution over the noise variables of the motion model.
protected  ExampleModel.OdometryModel odometryModel
          The odometry model.
protected  Gaussian odometryNoiseModel
          A distribution over the noise variables of the odometry model.
protected static int ROBOT_DIM
          The dimension of the robot state.
 
Constructor Summary
ExampleModel()
          Constructor.
 
Method Summary
 NoisyVectorFunction getInverseMeasurementModel(double[] z)
          Returns the landmark observation model.
 int getLandmarkDim()
          Returns the dimension of each landmark's state.
protected static Gaussian getLandmarkNoiseModel()
          Creates a landmark measurement noise model using parameters specified by system properties or default values (when the properties are not defined).
protected static Gaussian getLandmarkNoiseModel(double rangeRelNoise, double rangeAbsNoise, double bearingNoise)
          Creates a landmark measurement noise model.
 NoisyVectorFunction getMeasurementModel()
          Returns the landmark observation model.
 NoisyVectorFunction getMotionModel(double[] c)
          Returns the motion model.
protected static Gaussian getMotionNoiseModel()
          Creates a motion noise model using parameters specified by system properties or default values (when the properties are not defined).
protected static Gaussian getMotionNoiseModel(double tVelRelNoise, double tVelAbsNoise, double rVelRelNoise, double rVelAbsNoise)
          Creates a motion noise model.
 NoisyVectorFunction getOdometryModel()
          Returns the odometry model.
protected static Gaussian getOdometryNoiseModel()
          Creates an odometry noise model using parameters specified by system properties or default values (when the properties are not defined).
protected static Gaussian getOdometryNoiseModel(double tVelRelNoise, double tVelAbsNoise, double rVelRelNoise, double rVelAbsNoise)
          Creates an odometry noise model.
 int getRobotDim()
          Returns the dimension of the robot's state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROBOT_DIM

protected static final int ROBOT_DIM
The dimension of the robot state.

See Also:
Constant Field Values

LANDMARK_DIM

protected static final int LANDMARK_DIM
The dimension of each landmark's state.

See Also:
Constant Field Values

motionNoiseModel

protected Gaussian motionNoiseModel
A distribution over the noise variables of the motion model.


odometryNoiseModel

protected Gaussian odometryNoiseModel
A distribution over the noise variables of the odometry model.


odometryModel

protected ExampleModel.OdometryModel odometryModel
The odometry model. Since the model has no parameters, it is instantiated once.


landmarkNoiseModel

protected Gaussian landmarkNoiseModel
A distribution over the noise variables of the landmark measurement model.


landmarkMeasurementModel

public ExampleModel.LandmarkMeasurementModel landmarkMeasurementModel
The landmark measurement model.

Constructor Detail

ExampleModel

public ExampleModel()
Constructor.

Method Detail

getRobotDim

public int getRobotDim()
Returns the dimension of the robot's state.

Specified by:
getRobotDim in interface Model
Returns:
the dimension of the robot's state

getLandmarkDim

public int getLandmarkDim()
Returns the dimension of each landmark's state.

Specified by:
getLandmarkDim in interface Model
Returns:
the dimension of each landmark's state.

getMotionNoiseModel

protected static Gaussian getMotionNoiseModel(double tVelRelNoise,
                                              double tVelAbsNoise,
                                              double rVelRelNoise,
                                              double rVelAbsNoise)
Creates a motion noise model.

Parameters:
tVelRelNoise - the variance of the relative noise in the translational velocity control signal
tVelAbsNoise - the variance of the absolute noise in the translational velocity control signal specified in (meters/second)2
rVelRelNoise - the variance of the relative noise in the rotational velocity control signal
rVelAbsNoise - the variance of the absolute noise in the rotational velocity control signal specified in (radians/second)2
Returns:
a Gaussian distribution over a vector variable whose components correspond to the relative and absolute errors in the translational and rotational control signals

getMotionNoiseModel

protected static Gaussian getMotionNoiseModel()
Creates a motion noise model using parameters specified by system properties or default values (when the properties are not defined).

Returns:
a Gaussian distribution over a vector variable whose components correspond to the relative and absolute errors in the translational and rotational control signals

getMotionModel

public NoisyVectorFunction getMotionModel(double[] c)
Returns the motion model.

Specified by:
getMotionModel in interface Model
Returns:
the motion model

getOdometryNoiseModel

protected static Gaussian getOdometryNoiseModel(double tVelRelNoise,
                                                double tVelAbsNoise,
                                                double rVelRelNoise,
                                                double rVelAbsNoise)
Creates an odometry noise model.

Parameters:
tVelRelNoise - the variance of the relative noise in the translational velocity odometry measurement
tVelAbsNoise - the variance of the absolute noise in the translational velocity odometry measurement specified in (meters/second)2
rVelRelNoise - the variance of the relative noise in the rotational velocity odometry measurement
rVelAbsNoise - the variance of the absolute noise in the rotational velocity odometry measurement specified in (radians/second)2
Returns:
a Gaussian distribution over a vector variable whose components correspond to the relative and absolute errors in the translational and rotational odometry measurements

getOdometryNoiseModel

protected static Gaussian getOdometryNoiseModel()
Creates an odometry noise model using parameters specified by system properties or default values (when the properties are not defined).

Returns:
a Gaussian distribution over a vector variable whose components correspond to the relative and absolute errors in the translational and rotational odometry measurements

getOdometryModel

public NoisyVectorFunction getOdometryModel()
Returns the odometry model.

Specified by:
getOdometryModel in interface Model
Returns:
the odometry model

getLandmarkNoiseModel

protected static Gaussian getLandmarkNoiseModel(double rangeRelNoise,
                                                double rangeAbsNoise,
                                                double bearingNoise)
Creates a landmark measurement noise model.

Parameters:
rangeAbsNoise - the variance of the absolute noise in the range measurement specified in (meters/second)2
rangeRelNoise - the variance of the relative noise in the range measurements
bearingNoise - the variance of the absolute noise in the bearing measurements specified in (radians/second)2
Returns:
a Gaussian distribution over a vector variable whose components correspond to the relative and absolute errors in the range and bearing measurements

getLandmarkNoiseModel

protected static Gaussian getLandmarkNoiseModel()
Creates a landmark measurement noise model using parameters specified by system properties or default values (when the properties are not defined).

Returns:
a Gaussian distribution over a vector variable whose components correspond to the relative and absolute errors in the range and bearing measurements

getMeasurementModel

public NoisyVectorFunction getMeasurementModel()
Returns the landmark observation model.

Specified by:
getMeasurementModel in interface Model
Returns:
the landmark observation model

getInverseMeasurementModel

public NoisyVectorFunction getInverseMeasurementModel(double[] z)
Returns the landmark observation model.

Specified by:
getInverseMeasurementModel in interface Model
Parameters:
z - the landmark measurement