ompl::base::SubspaceProjectionEvaluator Class Reference

If the projection for a CompoundStateSpace is supposed to be the same as the one for one of its included subspaces, this class facilitates selecting a projection of that subspace. More...

#include <ompl/base/ProjectionEvaluator.h>

Inheritance diagram for ompl::base::SubspaceProjectionEvaluator:

Public Member Functions

 SubspaceProjectionEvaluator (const StateSpace *space, unsigned int index, ProjectionEvaluatorPtr projToUse=ProjectionEvaluatorPtr())
 The constructor states that for space space, the projection to use is the same as the component at position index of space space. The actual projection to use can be specified by projToUse. If the projection is not specified, the default one for the subspace at position index is used.
 
void setup () override
 Perform configuration steps, if needed.
 
unsigned int getDimension () const override
 Return the dimension of the projection defined by this evaluator.
 
void project (const State *state, Eigen::Ref< Eigen::VectorXd > projection) const override
 Compute the projection as an array of double values.
 
- Public Member Functions inherited from ompl::base::ProjectionEvaluator
 ProjectionEvaluator (const ProjectionEvaluator &)=delete
 
ProjectionEvaluatoroperator= (const ProjectionEvaluator &)=delete
 
 ProjectionEvaluator (const StateSpace *space)
 Construct a projection evaluator for a specific state space.
 
 ProjectionEvaluator (const StateSpacePtr &space)
 Construct a projection evaluator for a specific state space.
 
virtual void setCellSizes (const std::vector< double > &cellSizes)
 Define the size (in each dimension) of a grid cell. The number of sizes set here must be the same as the dimension of the projection computed by the projection evaluator. After a call to this function, setup() will not call defaultCellSizes() or inferCellSizes() any more.
 
void setCellSizes (unsigned int dim, double cellSize)
 Set the cell sizes to cellSize for a particular dimension dim. This function simply calls getCellSizes(), modifies the desired dimension and then calls setCellSizes(). This is done intentionally to enforce a call to setCellSizes().
 
void mulCellSizes (double factor)
 Multiply the cell sizes in each dimension by a specified factor factor. This function does nothing if cell sizes have not been set. If cell sizes have been set (irrespective of source; e.g., user, default or inferred), this function will then call setCellSizes(), so the source of the cell sizes will be considered to be the user.
 
bool userConfigured () const
 Return true if any user configuration has been done to this projection evaluator (setCellSizes() was called)
 
const std::vector< double > & getCellSizes () const
 Get the size (each dimension) of a grid cell

 
double getCellSizes (unsigned int dim) const
 Get the size of a particular dimension of a grid cell

 
void checkCellSizes () const
 Check if cell dimensions match projection dimension.
 
void inferCellSizes ()
 Sample the state space and decide on default cell sizes. This function is called by setup() if no cell dsizes have been set and defaultCellSizes() does not fill the cell sizes either.
 
virtual void defaultCellSizes ()
 Set the default cell dimensions for this projection. The default implementation of this function is empty. setup() calls this function if no cell dimensions have been previously set.
 
void checkBounds () const
 Check if the projection dimension matched the dimension of the bounds.
 
bool hasBounds () const
 Check if bounds were specified for this projection.
 
void setBounds (const RealVectorBounds &bounds)
 Set bounds on the projection. The PDST planner needs to known the bounds on the projection. Default bounds are automatically computed by inferCellSizes().
 
const RealVectorBoundsgetBounds () const
 Get the bounds computed/set for this projection.
 
void inferBounds ()
 Compute an approximation of the bounds for this projection space. getBounds() will then report the computed bounds.
 
void computeCoordinates (const Eigen::Ref< Eigen::VectorXd > &projection, Eigen::Ref< Eigen::VectorXi > coord) const
 Compute integer coordinates for a projection.
 
void computeCoordinates (const State *state, Eigen::Ref< Eigen::VectorXi > coord) const
 Compute integer coordinates for a state.
 
ParamSetparams ()
 Get the parameters for this projection.
 
const ParamSetparams () const
 Get the parameters for this projection.
 
virtual void printSettings (std::ostream &out=std::cout) const
 Print settings about this projection.
 
virtual void printProjection (const Eigen::Ref< Eigen::VectorXd > &projection, std::ostream &out=std::cout) const
 Print a euclidean projection.
 

Protected Attributes

unsigned int index_
 The index of the subspace from which to project.
 
ProjectionEvaluatorPtr proj_
 The projection to use. This is either the same as specifiedProj_ or, if specifiedProj_ is not initialized, it is the default projection for the subspace at index index_.
 
ProjectionEvaluatorPtr specifiedProj_
 The projection that is optionally specified by the user in the constructor argument (projToUse)
 
- Protected Attributes inherited from ompl::base::ProjectionEvaluator
const StateSpacespace_
 The state space this projection operates on.
 
std::vector< double > cellSizes_
 The size of a cell, in every dimension of the projected space, in the implicitly defined integer grid.
 
RealVectorBounds bounds_
 A bounding box for projected state values.
 
RealVectorBounds estimatedBounds_
 An approximate bounding box for projected state values; This is the cached result of estimateBounds() which may later be copied to bounds_ if bounds are needed but were not specified.
 
bool defaultCellSizes_
 Flag indicating whether cell sizes have been set by the user, or whether they were inferred automatically. This flag becomes false if setCellSizes() is called.
 
bool cellSizesWereInferred_
 Flag indicating whether projection cell sizes were automatically inferred.
 
ParamSet params_
 The set of parameters for this projection.
 

Additional Inherited Members

- Protected Member Functions inherited from ompl::base::ProjectionEvaluator
void estimateBounds ()
 Fill estimatedBounds_ with an approximate bounding box for the projection space (via sampling)
 

Detailed Description

If the projection for a CompoundStateSpace is supposed to be the same as the one for one of its included subspaces, this class facilitates selecting a projection of that subspace.

Definition at line 363 of file ProjectionEvaluator.h.


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