motris.model
Class CarDynamicModelPece

java.lang.Object
  extended bymotris.data.Description
      extended byparameter.ParameterizedObjectAdaptor
          extended bymotris.model.CarDynamicModelPece
All Implemented Interfaces:
DynamicModel, ParameterizedObject

public class CarDynamicModelPece
extends ParameterizedObjectAdaptor
implements DynamicModel

Dynamical Model introduced by Arthur E.C. Pece in his ECCV2002 paper. Extended by Paul Reuter to include 2nd derivatives for OF Adaption

Author:
preuter

Nested Class Summary
 
Nested classes inherited from class parameter.ParameterizedObject
ParameterizedObject.ParameterChangedListener, ParameterizedObject.ParameterizedObjectManager
 
Field Summary
(package private)  boolean dirty
           
(package private)  int[] DOF
           
(package private)  JSci.maths.DoubleSquareMatrix[] firstDerivation
           
(package private)  boolean gradientdirty
           
(package private)  boolean hessiandirty
           
(package private)  java.util.Vector higherOrderParams
           
(package private)  JSci.maths.DoubleSquareMatrix matrix
           
(package private)  int[] paramIndices
           
(package private)  Parameter[] Params
           
(package private)  JSci.maths.DoubleSquareMatrix[] secondDerivation
           
(package private)  JSci.maths.DoubleSquareMatrix toGlobal
           
(package private)  boolean toglobaldirty
           
 
Fields inherited from class parameter.ParameterizedObjectAdaptor
parameterChangedNotifyList
 
Fields inherited from class motris.data.Description
 
Constructor Summary
CarDynamicModelPece(ParameterSet _params, State _state)
           
 
Method Summary
 boolean addParameterChangedListener(ParameterizedObject.ParameterChangedListener l)
          Register dependent component that wants to be notified if this object changes parameters
 void advanceTimeStep(double deltaT, JSci.maths.DoubleSquareMatrix F)
          Predict state for next time t+deltaT
 void calculateDerivations(JSci.maths.DoubleSquareMatrix[] tensorinput, JSci.maths.DoubleSquareMatrix[] gradientinput, JSci.maths.DoubleSquareMatrix toGlobalinput, State state)
          Precompute internal derivation matrices.
private  JSci.maths.DoubleSquareMatrix[] derive()
           
private  JSci.maths.DoubleSquareMatrix[][] derive2()
           
 int[] getDOF()
          Return degrees of freedom.
 JSci.maths.DoubleSquareMatrix[] getLocalToParent(int derivativeNumber)
           
 ParameterSet getParameters()
          Get a Vector of Strings with a description of each Parameter
 ParameterSet getParameters(boolean forSave)
          Get Matrix parameters
 JSci.maths.DoubleSquareMatrix getToGlobal()
           
 void markDirty()
          Mark internally computed matrices as dirty so that they are recomputed on next call of getLocalToParent() Note: replaces update() in DerivableMatrix
 boolean parameterEdited(ParameterSet editedParams)
          Notify when Parameter set was changed during edit
 boolean removeParameterChangedListener(ParameterizedObject.ParameterChangedListener l)
          un-register dependent object
 boolean setParameters(ParameterSet _params)
          Set Parameters of this class
 void update()
          update calculates the matrix defined by the transformations described by Params RotX represents a rotation about the X-axis, TransX a translation along the X-axis the resulting matrix is the product of TransZ * TransY * TransX * RotY * RotX * RotZ
 
Methods inherited from class parameter.ParameterizedObjectAdaptor
finalize, fireParameterChanged
 
Methods inherited from class motris.data.Description
getDescription, getIdentifier, getName, setDescription, setIdentifier, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Params

Parameter[] Params

dirty

boolean dirty

gradientdirty

boolean gradientdirty

hessiandirty

boolean hessiandirty

toglobaldirty

boolean toglobaldirty

higherOrderParams

java.util.Vector higherOrderParams

paramIndices

int[] paramIndices

DOF

int[] DOF

matrix

JSci.maths.DoubleSquareMatrix matrix

toGlobal

JSci.maths.DoubleSquareMatrix toGlobal

secondDerivation

JSci.maths.DoubleSquareMatrix[] secondDerivation

firstDerivation

JSci.maths.DoubleSquareMatrix[] firstDerivation
Constructor Detail

CarDynamicModelPece

public CarDynamicModelPece(ParameterSet _params,
                           State _state)
Method Detail

derive

private JSci.maths.DoubleSquareMatrix[] derive()

derive2

private JSci.maths.DoubleSquareMatrix[][] derive2()

getDOF

public int[] getDOF()
Description copied from interface: DynamicModel
Return degrees of freedom.

Specified by:
getDOF in interface DynamicModel

update

public void update()
update calculates the matrix defined by the transformations described by Params RotX represents a rotation about the X-axis, TransX a translation along the X-axis the resulting matrix is the product of TransZ * TransY * TransX * RotY * RotX * RotZ


setParameters

public boolean setParameters(ParameterSet _params)
Description copied from interface: ParameterizedObject
Set Parameters of this class

Specified by:
setParameters in interface ParameterizedObject
Overrides:
setParameters in class ParameterizedObjectAdaptor

getParameters

public ParameterSet getParameters()
Description copied from interface: ParameterizedObject
Get a Vector of Strings with a description of each Parameter

Specified by:
getParameters in interface ParameterizedObject
Overrides:
getParameters in class ParameterizedObjectAdaptor

getParameters

public ParameterSet getParameters(boolean forSave)
Get Matrix parameters

Parameters:
forSave - if true, return all Parameters (free+nonfree). If false, return only nonfree Parameters (for viewing)
Returns:
matrix parameters

parameterEdited

public boolean parameterEdited(ParameterSet editedParams)
Description copied from interface: ParameterizedObject
Notify when Parameter set was changed during edit

Specified by:
parameterEdited in interface ParameterizedObject
Overrides:
parameterEdited in class ParameterizedObjectAdaptor

addParameterChangedListener

public boolean addParameterChangedListener(ParameterizedObject.ParameterChangedListener l)
Description copied from interface: ParameterizedObject
Register dependent component that wants to be notified if this object changes parameters

Specified by:
addParameterChangedListener in interface ParameterizedObject
Overrides:
addParameterChangedListener in class ParameterizedObjectAdaptor

removeParameterChangedListener

public boolean removeParameterChangedListener(ParameterizedObject.ParameterChangedListener l)
Description copied from interface: ParameterizedObject
un-register dependent object

Specified by:
removeParameterChangedListener in interface ParameterizedObject
Overrides:
removeParameterChangedListener in class ParameterizedObjectAdaptor

getLocalToParent

public JSci.maths.DoubleSquareMatrix[] getLocalToParent(int derivativeNumber)
Specified by:
getLocalToParent in interface DynamicModel
Parameters:
derivativeNumber - n
Returns:
nth derivative of the transformation from this RigidModel to the parent model

advanceTimeStep

public void advanceTimeStep(double deltaT,
                            JSci.maths.DoubleSquareMatrix F)
Description copied from interface: DynamicModel
Predict state for next time t+deltaT

Specified by:
advanceTimeStep in interface DynamicModel
Parameters:
deltaT - time difference [s]
F - first derivative of prediction function

markDirty

public void markDirty()
Description copied from interface: DynamicModel
Mark internally computed matrices as dirty so that they are recomputed on next call of getLocalToParent() Note: replaces update() in DerivableMatrix

Specified by:
markDirty in interface DynamicModel

calculateDerivations

public void calculateDerivations(JSci.maths.DoubleSquareMatrix[] tensorinput,
                                 JSci.maths.DoubleSquareMatrix[] gradientinput,
                                 JSci.maths.DoubleSquareMatrix toGlobalinput,
                                 State state)
Description copied from interface: DynamicModel
Precompute internal derivation matrices. In a kinematic chain, these depend on previous matrices

Specified by:
calculateDerivations in interface DynamicModel
Parameters:
tensorinput - functions as in and output for the second derivation times dState /dt
gradientinput - functions as in and output for the first derivation
toGlobalinput - concatenation of all local-to-parent matrices up to the global coordinate system
state -

getToGlobal

public JSci.maths.DoubleSquareMatrix getToGlobal()
Specified by:
getToGlobal in interface DynamicModel
Returns:
transformation from local to global coordinate system