KrisLibrary
1.0.0
|
A cost that penalizes via a 2D table lookup of a single index. More...
#include <Tabular.h>
Public Member Functions | |
Tabular2DObjective (const Array2D< Real > &differentialCosts, const Array2D< Real > &terminalCosts, const Math3D::Vector2 &bmin, const Math3D::Vector2 &bmax, int dim0=0, int dim1=1) | |
virtual const char * | TypeString () |
Subclasses: return an identifier for this goal type. | |
virtual std::string | Description () |
Subclasses: return a string for printing (optional) | |
virtual bool | PathInvariant () const |
Subclasses: planners may exploit path-invariant costs for faster performance. | |
virtual Real | IncrementalCost (const Interpolator *path) |
virtual Real | TerminalCost (const Vector &qend) |
Public Member Functions inherited from ObjectiveFunctionalBase | |
virtual Real | IncrementalCost (const ControlInput &u, const Interpolator *path) |
virtual Real | IncrementalCost (const KinodynamicMilestonePath &path) |
virtual Real | TerminalCost (const Config &qend) |
Subclasses: return the cost of a terminal state. | |
virtual Real | PathCost (const MilestonePath &path) |
virtual Real | PathCost (const KinodynamicMilestonePath &path) |
virtual bool | SaveParams (AnyCollection &collection) |
Subclasses: read and write parameters to collection. | |
virtual bool | LoadParams (AnyCollection &collection) |
Public Attributes | |
Meshing::AreaGridTemplate< Real > | differentialCosts |
Meshing::AreaGridTemplate< Real > | terminalCosts |
int | dim0 |
int | dim1 |
A cost that penalizes via a 2D table lookup of a single index.
The cost tables are assumed to be on a grid over the domain [bmin,bmax]. Values past the interval are clamped to the range.
For the incremental cost, the state [x(dim0),x(dim1)] is looked up in differentialCosts. This is integrated over the length of the interpolator.
For the incremental cost, the state [x(dim0,x(dim1)] is looked up in terminalCosts.
Either table can be empty, in which case no cost is assessed.
|
virtual |
Subclasses: return the incremental cost of undertaking the given path. This should be equal to the integral of the differential cost, or at least a good approximation
Reimplemented from ObjectiveFunctionalBase.