ProjectionEvaluator.h
234 void computeCoordinates(const EuclideanProjection &projection, ProjectionCoordinates &coord) const;
260 virtual void printProjection(const EuclideanProjection &projection, std::ostream &out = std::cout) const;
virtual unsigned int getDimension() const =0
Return the dimension of the projection defined by this evaluator.
std::vector< double > cellSizes_
The size of a cell, in every dimension of the projected space, in the implicitly defined integer grid...
Definition: ProjectionEvaluator.h:272
void print(std::ostream &out=std::cout) const
Print the contained projection matrix to a stram.
Definition: ProjectionEvaluator.cpp:125
If the projection for a CompoundStateSpace is supposed to be the same as the one for one of its inclu...
Definition: ProjectionEvaluator.h:300
const RealVectorBounds & getBounds() const
Get the bounds computed/set for this projection.
Definition: ProjectionEvaluator.h:221
bool cellSizesWereInferred_
Flag indicating whether projection cell sizes were automatically inferred.
Definition: ProjectionEvaluator.h:290
void computeRandom(unsigned int from, unsigned int to, const std::vector< double > &scale)
Wrapper for ComputeRandom(from, to, scale)
Definition: ProjectionEvaluator.cpp:105
A shared pointer wrapper for ompl::base::StateSpace.
void checkBounds() const
Check if the projection dimension matched the dimension of the bounds.
Definition: ProjectionEvaluator.cpp:208
void inferBounds()
Compute an approximation of the bounds for this projection space. getBounds() will then report the co...
Definition: ProjectionEvaluator.cpp:236
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 po...
Definition: ProjectionEvaluator.cpp:358
ProjectionEvaluatorPtr specifiedProj_
The projection that is optionally specified by the user in the constructor argument (projToUse) ...
Definition: ProjectionEvaluator.h:330
void inferCellSizes()
Sample the state space and decide on default cell sizes. This function is called by setup() if no cel...
Definition: ProjectionEvaluator.cpp:280
RealVectorBounds estimatedBounds_
An approximate bounding box for projected state values; This is the cached result of estimateBounds()...
Definition: ProjectionEvaluator.h:280
unsigned int getDimension() const override
Return the dimension of the projection defined by this evaluator.
Definition: ProjectionEvaluator.cpp:382
const std::vector< double > & getCellSizes() const
Get the size (each dimension) of a grid cell.
Definition: ProjectionEvaluator.h:182
const StateSpace * space_
The state space this projection operates on.
Definition: ProjectionEvaluator.h:267
bool defaultCellSizes_
Flag indicating whether cell sizes have been set by the user, or whether they were inferred automatic...
Definition: ProjectionEvaluator.h:286
virtual void defaultCellSizes()
Set the default cell dimensions for this projection. The default implementation of this function is e...
Definition: ProjectionEvaluator.cpp:215
unsigned int index_
The index of the subspace from which to project.
Definition: ProjectionEvaluator.h:320
void mulCellSizes(double factor)
Multiply the cell sizes in each dimension by a specified factor factor. This function does nothing if...
Definition: ProjectionEvaluator.cpp:189
A shared pointer wrapper for ompl::base::ProjectionEvaluator.
std::vector< int > ProjectionCoordinates
Grid cells corresponding to a projection value are described in terms of their coordinates.
Definition: ProjectionEvaluator.h:56
Representation of a space in which planning can be performed. Topology specific sampling, interpolation and distance are defined.
Definition: StateSpace.h:70
const ParamSet & params() const
Get the parameters for this projection.
Definition: ProjectionEvaluator.h:251
boost::numeric::ublas::vector< double > EuclideanProjection
The datatype for state projections. This class contains a real vector.
Definition: ProjectionEvaluator.h:59
void computeCoordinates(const State *state, ProjectionCoordinates &coord) const
Compute integer coordinates for a state.
Definition: ProjectionEvaluator.h:237
A projection matrix – it allows multiplication of real vectors by a specified matrix. The matrix can also be randomly generated.
Definition: ProjectionEvaluator.h:63
void project(const State *state, EuclideanProjection &projection) const override
Compute the projection as an array of double values.
Definition: ProjectionEvaluator.cpp:387
virtual void project(const State *state, EuclideanProjection &projection) const =0
Compute the projection as an array of double values.
virtual void printProjection(const EuclideanProjection &projection, std::ostream &out=std::cout) const
Print a euclidean projection.
Definition: ProjectionEvaluator.cpp:353
void project(const double *from, EuclideanProjection &to) const
Multiply the vector from by the contained projection matrix to obtain the vector to.
Definition: ProjectionEvaluator.cpp:116
The lower and upper bounds for an Rn space.
Definition: RealVectorBounds.h:47
void estimateBounds()
Fill estimatedBounds_ with an approximate bounding box for the projection space (via sampling) ...
Definition: ProjectionEvaluator.cpp:243
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().
Definition: ProjectionEvaluator.cpp:163
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 ...
Definition: ProjectionEvaluator.cpp:155
void computeCoordinates(const EuclideanProjection &projection, ProjectionCoordinates &coord) const
Compute integer coordinates for a projection.
Definition: ProjectionEvaluator.cpp:324
virtual void printSettings(std::ostream &out=std::cout) const
Print settings about this projection.
Definition: ProjectionEvaluator.cpp:330
boost::numeric::ublas::matrix< double > Matrix
Datatype for projection matrices.
Definition: ProjectionEvaluator.h:67
bool userConfigured() const
Return true if any user configuration has been done to this projection evaluator (setCellSizes() was ...
Definition: ProjectionEvaluator.cpp:150
RealVectorBounds bounds_
A bounding box for projected state values.
Definition: ProjectionEvaluator.h:275
void checkCellSizes() const
Check if cell dimensions match projection dimension.
Definition: ProjectionEvaluator.cpp:200
bool hasBounds() const
Check if bounds were specified for this projection.
Definition: ProjectionEvaluator.h:210
void setup() override
Perform configuration steps, if needed.
Definition: ProjectionEvaluator.cpp:369
static Matrix ComputeRandom(unsigned int from, unsigned int to, const std::vector< double > &scale)
Compute a random projection matrix with from columns and to rows. A vector with from elements can be ...
Definition: ProjectionEvaluator.cpp:51
Abstract definition for a class computing projections to Rn. Implicit integer grids are imposed on th...
Definition: ProjectionEvaluator.h:133
ProjectionEvaluatorPtr proj_
The projection to use. This is either the same as specifiedProj_ or, if specifiedProj_ is not initial...
Definition: ProjectionEvaluator.h:326