#include <model.h>
Inheritance diagram for Model::
Public Methods | |
Model (string path) | |
Empty constructor. | |
virtual | ~Model () |
Empty destructor. | |
virtual list<MSLVector> | GetInputs (const MSLVector &x) |
Return a list of inputs, which may depend on state. | |
virtual MSLVector | StateTransitionEquation (const MSLVector &x, const MSLVector &u)=0 |
The state transition equation, or equations of motion, xdot=f(x,u). | |
virtual bool | Satisfied (const MSLVector &x) |
Test whether global state-space constraints are satisfied. | |
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. | |
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. | |
virtual MSLVector | StateToConfiguration (const MSLVector &x) |
A method that converts a Model state in to a Geom configuration. | |
virtual double | Metric (const MSLVector &x1, const MSLVector &x2) |
A distance metric, which is Euclidean in the base class. | |
virtual void | Partialf_x (const MSLVector &x, const MSLVector &u, MSLMatrix &m) |
Partial with respect to x of the state transition equation. | |
virtual void | Partialf_u (const MSLVector &x, const MSLVector &u, MSLMatrix &m) |
Partial with respect to u of the state transition equation. | |
virtual void | L (const MSLVector &x, const MSLVector &u, double &l) |
A cost or loss function, to be used in optimization problems. | |
virtual void | PartialL_x (const MSLVector &x, const MSLVector &u, MSLMatrix &m) |
Partial of the loss with respect to x. | |
virtual void | PartialL_u (const MSLVector &x, const MSLVector &u, MSLMatrix &m) |
Partial of the loss with respect to u. | |
virtual void | Phi (const MSLVector &x, const MSLVector &u, const MSLVector &goalstate, double &phi) |
The final-state cost or loss. | |
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. | |
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. | |
virtual void | Psi (const MSLVector &x, const MSLVector &goalstate, MSLVector &psi) |
An error MSLVector that compares a goal state to a given state. | |
virtual void | PartialPsi_x (const MSLVector &x, const MSLVector &u, MSLMatrix &m) |
Partial of the error MSLVector with respect to x. | |
virtual void | PartialPsi_t (const MSLVector &x, const MSLVector &u, MSLMatrix &m) |
Partial of the error MSLVector with respect to time. | |
Public Attributes | |
string | FilePath |
This file path is used for all file reads. | |
MSLVector | LowerState |
MSLVector of minimum values for each state variable. | |
MSLVector | UpperState |
MSLVector of maximum values for each state variable. | |
MSLVector | LowerInput |
MSLVector of minimum values for each input variable. | |
MSLVector | UpperInput |
MSLVector of maximum values for each input variable. | |
int | StateDim |
The dimension of the state space. | |
int | InputDim |
The dimension of the input space. | |
Protected Methods | |
MSLVector | RungeKuttaIntegrate (const MSLVector &x, const MSLVector &u, const double &h) |
Integrate xdot using 4th-order Runge-Kutta. | |
MSLVector | EulerIntegrate (const MSLVector &x, const MSLVector &u, const double &h) |
Integrate xdot using Euler integration. | |
Protected Attributes | |
double | ModelDeltaT |
The time interval to use for numerical integration (affects accuracy). | |
list<MSLVector> | Inputs |
The complete set of inputs. |
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.
|
Empty constructor.
|
|
Empty destructor.
|
|
Integrate xdot using Euler integration.
|
|
Return a list of inputs, which may depend on state.
|
|
Perform integration from state x, using input u, over time step h.
Reimplemented in Model2DPoint, Model2DPointCar, Model2DRigid, Model2DRigidCarSmooth, Model2DRigidDyncar, Model2DRigidLander, Model3DRigid, Model1D, ModelLinear, ModelND, ModelNintegrator, and Model3DRigidHelical. |
|
A cost or loss function, to be used in optimization problems.
|
|
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, Model2DRigidDyncar, Model2DRigidMulti, Model2DRigidChain, Model3DRigid, Model3DRigidMulti, Model3DRigidChain, and Model3DRigidTree. |
|
A distance metric, which is Euclidean in the base class.
Reimplemented in Model2DPoint, Model2DPointCar, Model2DRigid, Model2DRigidCarSmooth, Model2DRigidCarSmoothTrailer, Model2DRigidCarSmooth2Trailers, Model2DRigidCarSmooth3Trailers, Model2DRigidDyncar, Model2DRigidLander, Model2DRigidMulti, Model2DRigidChain, Model3DRigid, Model3DRigidMulti, Model3DRigidChain, Model3DRigidTree, and Model1D. |
|
Partial of the loss with respect to u.
|
|
Partial of the loss with respect to x.
|
|
Partial of the final-state loss with respect to u.
|
|
Partial of the final-state loss with respect to x.
|
|
Partial of the error MSLVector with respect to time.
|
|
Partial of the error MSLVector with respect to x.
|
|
Partial with respect to u of the state transition equation.
|
|
Partial with respect to x of the state transition equation.
|
|
The final-state cost or loss.
|
|
An error MSLVector that compares a goal state to a given state.
|
|
Integrate xdot using 4th-order Runge-Kutta.
|
|
Test whether global state-space constraints are satisfied.
Reimplemented in Model2DRigidCarSmooth, Model2DRigidCarSmoothTrailer, Model2DRigidCarSmooth2Trailers, Model2DRigidCarSmooth3Trailers, Model2DRigidChain, Model3DRigidChain, and Model3DRigidTree. |
|
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.
|
|
A method that converts a Model state in to a Geom configuration.
Reimplemented in Model2D, Model2DRigid, Model2DRigidCarSmooth, Model2DRigidCarSmoothTrailer, Model2DRigidCarSmooth2Trailers, Model2DRigidCarSmooth3Trailers, Model2DRigidDyncar, Model2DRigidLander, Model2DRigidMulti, Model2DRigidChain, Model3DRigidChain, Model3DRigidTree, Model1D, ModelLinear, ModelND, and ModelNintegrator. |
|
The state transition equation, or equations of motion, xdot=f(x,u).
Reimplemented in Model2DPoint, Model2DPointCar, Model2DRigid, Model2DRigidCar, Model2DRigidCarSmooth, Model2DRigidCarSmoothTrailer, Model2DRigidCarSmooth2Trailers, Model2DRigidCarSmooth3Trailers, Model2DRigidDyncar, Model2DRigidDyncarNtire, Model2DRigidLander, Model2DRigidChain, Model3DRigid, Model3DRigidChain, Model3DRigidTree, Model1D, ModelLinear, ModelND, ModelNintegrator, and Model3DRigidHelical. |
|
This file path is used for all file reads.
|
|
The dimension of the input space.
|
|
The complete set of inputs.
|
|
MSLVector of minimum values for each input variable.
|
|
MSLVector of minimum values for each state variable.
|
|
The time interval to use for numerical integration (affects accuracy).
|
|
The dimension of the state space.
|
|
MSLVector of maximum values for each input variable.
|
|
MSLVector of maximum values for each state variable.
|