Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Model Class Reference

The incremental simulator model. More...

#include <model.h>

Inheritance diagram for Model:

Model1D Model2D Model3D ModelLinear ModelND ModelNintegrator Model2DPoint Model2DRigid Model3DRigid Model2DPointCar Model2DRigidCar Model2DRigidChain Model2DRigidDyncar Model2DRigidLander Model2DRigidMulti Model3DDyn Model3DRigidChain Model3DRigidHelical Model3DRigidMulti Model3DRigidTree List of all members.

Public Methods

 Model (string path)
 Empty constructor. More...

virtual ~Model ()
 Empty destructor. More...

virtual list< MSLVectorGetInputs (const MSLVector &x)
 Return a list of inputs, which may depend on state. More...

virtual MSLVector StateTransitionEquation (const MSLVector &x, const MSLVector &u)=0
 The state transition equation, or equations of motion, xdot=f(x,u). More...

virtual bool Satisfied (const MSLVector &x)
 Test whether global state-space constraints are satisfied. More...

virtual MSLVector Integrate (const MSLVector &x, const MSLVector &u, const double &h)=0
 Perform integration from state x, using input u, over time step h. More...

virtual MSLVector LinearInterpolate (const MSLVector &x1, const MSLVector &x2, const double &a)
 Linearly interpolate two state while respecting topology. More...

virtual MSLVector StateDifference (const MSLVector &x1, const MSLVector &x2)
 Compute a MSLVector based on x2-x1. In R^n, the states are simply subtracted to make the MSLVector. This method exists to make things work correctly for other state-space topologies. More...

virtual MSLVector StateToConfiguration (const MSLVector &x)
 A method that converts a Model state in to a Geom configuration. More...

virtual double Metric (const MSLVector &x1, const MSLVector &x2)
 A distance metric, which is Euclidean in the base class. More...

virtual void Partialf_x (const MSLVector &x, const MSLVector &u, MSLMatrix &m)
 Partial with respect to x of the state transition equation. More...

virtual void Partialf_u (const MSLVector &x, const MSLVector &u, MSLMatrix &m)
 Partial with respect to u of the state transition equation. More...

virtual void L (const MSLVector &x, const MSLVector &u, double &l)
 A cost or loss function, to be used in optimization problems. More...

virtual void PartialL_x (const MSLVector &x, const MSLVector &u, MSLMatrix &m)
 Partial of the loss with respect to x. More...

virtual void PartialL_u (const MSLVector &x, const MSLVector &u, MSLMatrix &m)
 Partial of the loss with respect to u. More...

virtual void Phi (const MSLVector &x, const MSLVector &u, const MSLVector &goalstate, double &phi)
 The final-state cost or loss. More...

virtual void PartialPhi_x (const MSLVector &x, const MSLVector &u, const MSLVector &goalstate, MSLMatrix &m)
 Partial of the final-state loss with respect to x. More...

virtual void PartialPhi_t (const MSLVector &x, const MSLVector &u, const MSLVector &goalstate, MSLMatrix &m)
 Partial of the final-state loss with respect to u. More...

virtual void Psi (const MSLVector &x, const MSLVector &goalstate, MSLVector &psi)
 An error MSLVector that compares a goal state to a given state. More...

virtual void PartialPsi_x (const MSLVector &x, const MSLVector &u, MSLMatrix &m)
 Partial of the error MSLVector with respect to x. More...

virtual void PartialPsi_t (const MSLVector &x, const MSLVector &u, MSLMatrix &m)
 Partial of the error MSLVector with respect to time. More...


Public Attributes

string FilePath
 This file path is used for all file reads. More...

MSLVector LowerState
 MSLVector of minimum values for each state variable. More...

MSLVector UpperState
 MSLVector of maximum values for each state variable. More...

MSLVector LowerInput
 MSLVector of minimum values for each input variable. More...

MSLVector UpperInput
 MSLVector of maximum values for each input variable. More...

int StateDim
 The dimension of the state space. More...

int InputDim
 The dimension of the input space. More...


Protected Methods

MSLVector RungeKuttaIntegrate (const MSLVector &x, const MSLVector &u, const double &h)
 Integrate xdot using 4th-order Runge-Kutta. More...

MSLVector EulerIntegrate (const MSLVector &x, const MSLVector &u, const double &h)
 Integrate xdot using Euler integration. More...


Protected Attributes

double ModelDeltaT
 The time interval to use for numerical integration (affects accuracy). More...

list< MSLVectorInputs
 The complete set of inputs. More...


Detailed Description

The incremental simulator model.

The Model classes contain incremental simulators that model the kinematics and dynamics of a variety of mechanical systems. The methods allow planning algorithms to compute the future system state, given the current state, an interval of time, and a control input applied over that interval. (The planning algorithms select the appropriate inputs using this information.) Using object-oriented class derivations, a wide variety of simulators can be included.


Constructor & Destructor Documentation

Model::Model string    path
 

Empty constructor.

virtual Model::~Model   [inline, virtual]
 

Empty destructor.


Member Function Documentation

MSLVector Model::EulerIntegrate const MSLVector   x,
const MSLVector   u,
const double &    h
[protected]
 

Integrate xdot using Euler integration.

list< MSLVector > Model::GetInputs const MSLVector   x [virtual]
 

Return a list of inputs, which may depend on state.

virtual MSLVector Model::Integrate const MSLVector   x,
const MSLVector   u,
const double &    h
[pure virtual]
 

Perform integration from state x, using input u, over time step h.

Implemented in Model3DRigidHelical.

virtual void Model::L const MSLVector   x,
const MSLVector   u,
double &    l
[inline, virtual]
 

A cost or loss function, to be used in optimization problems.

MSLVector Model::LinearInterpolate const MSLVector   x1,
const MSLVector   x2,
const double &    a
[virtual]
 

Linearly interpolate two state while respecting topology.

If a=0, then x1 is returned; if a=1, then x2 is returned. All intermediate values of $a \in [0,1]$ yield intermediate states. This method is defined by Model.

Reimplemented in Model2DRigid.

double Model::Metric const MSLVector   x1,
const MSLVector   x2
[virtual]
 

A distance metric, which is Euclidean in the base class.

Reimplemented in Model2DPoint.

virtual void Model::Partialf_u const MSLVector   x,
const MSLVector   u,
MSLMatrix   m
[inline, virtual]
 

Partial with respect to u of the state transition equation.

virtual void Model::Partialf_x const MSLVector   x,
const MSLVector   u,
MSLMatrix   m
[inline, virtual]
 

Partial with respect to x of the state transition equation.

virtual void Model::PartialL_u const MSLVector   x,
const MSLVector   u,
MSLMatrix   m
[inline, virtual]
 

Partial of the loss with respect to u.

virtual void Model::PartialL_x const MSLVector   x,
const MSLVector   u,
MSLMatrix   m
[inline, virtual]
 

Partial of the loss with respect to x.

virtual void Model::PartialPhi_t const MSLVector   x,
const MSLVector   u,
const MSLVector   goalstate,
MSLMatrix   m
[inline, virtual]
 

Partial of the final-state loss with respect to u.

virtual void Model::PartialPhi_x const MSLVector   x,
const MSLVector   u,
const MSLVector   goalstate,
MSLMatrix   m
[inline, virtual]
 

Partial of the final-state loss with respect to x.

virtual void Model::PartialPsi_t const MSLVector   x,
const MSLVector   u,
MSLMatrix   m
[inline, virtual]
 

Partial of the error MSLVector with respect to time.

virtual void Model::PartialPsi_x const MSLVector   x,
const MSLVector   u,
MSLMatrix   m
[inline, virtual]
 

Partial of the error MSLVector with respect to x.

virtual void Model::Phi const MSLVector   x,
const MSLVector   u,
const MSLVector   goalstate,
double &    phi
[inline, virtual]
 

The final-state cost or loss.

virtual void Model::Psi const MSLVector   x,
const MSLVector   goalstate,
MSLVector   psi
[inline, virtual]
 

An error MSLVector that compares a goal state to a given state.

MSLVector Model::RungeKuttaIntegrate const MSLVector   x,
const MSLVector   u,
const double &    h
[protected]
 

Integrate xdot using 4th-order Runge-Kutta.

bool Model::Satisfied const MSLVector   x [virtual]
 

Test whether global state-space constraints are satisfied.

Reimplemented in Model2DRigidCarSmooth.

MSLVector Model::StateDifference const MSLVector   x1,
const MSLVector   x2
[virtual]
 

Compute a MSLVector based on x2-x1. In R^n, the states are simply subtracted to make the MSLVector. This method exists to make things work correctly for other state-space topologies.

Reimplemented in Model2DRigid.

MSLVector Model::StateToConfiguration const MSLVector   x [virtual]
 

A method that converts a Model state in to a Geom configuration.

Reimplemented in Model2D.

virtual MSLVector Model::StateTransitionEquation const MSLVector   x,
const MSLVector   u
[pure virtual]
 

The state transition equation, or equations of motion, xdot=f(x,u).

Implemented in Model3DRigidHelical.


Member Data Documentation

string Model::FilePath
 

This file path is used for all file reads.

int Model::InputDim
 

The dimension of the input space.

list<MSLVector> Model::Inputs [protected]
 

The complete set of inputs.

MSLVector Model::LowerInput
 

MSLVector of minimum values for each input variable.

MSLVector Model::LowerState
 

MSLVector of minimum values for each state variable.

double Model::ModelDeltaT [protected]
 

The time interval to use for numerical integration (affects accuracy).

int Model::StateDim
 

The dimension of the state space.

MSLVector Model::UpperInput
 

MSLVector of maximum values for each input variable.

MSLVector Model::UpperState
 

MSLVector of maximum values for each state variable.


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


Web page maintained by Steve LaValle