KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
Tabular3DObjective Class Reference

A cost that penalizes via a 3D table lookup of a single index. More...

#include <Tabular.h>

Inheritance diagram for Tabular3DObjective:
ObjectiveFunctionalBase

Public Member Functions

 Tabular3DObjective (const Array3D< Real > &differentialCosts, const Array3D< Real > &terminalCosts, const Math3D::Vector3 &bmin, const Math3D::Vector3 &bmax, int dim0=0, int dim1=1, int dim2=2)
 
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::VolumeGridTemplate< Real > differentialCosts
 
Meshing::VolumeGridTemplate< Real > terminalCosts
 
int dim0
 
int dim1
 
int dim2
 

Detailed Description

A cost that penalizes via a 3D 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(index0) is looked up in differentialCosts, using linear interpolation. This is integrated over the length of the interpolator.

For the incremental cost, the state x(index) is looked up in terminalCosts, using linear interpolation.

Either table can be empty, in which case no cost is assessed.

Member Function Documentation

Real Tabular3DObjective::IncrementalCost ( const Interpolator path)
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.


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