ompl::base::TypedSpaceInformation< SpaceType_ > Class Template Reference
Inheritance diagram for ompl::base::TypedSpaceInformation< SpaceType_ >:

Public Types

using SpaceType = SpaceType_
 
using StateType = typename SpaceType::StateType
 
using ScopedStateType = ScopedState< SpaceType >
 
using SpacePtr = std::shared_ptr< SpaceType >
 
using Ptr = std::shared_ptr< TypedSpaceInformation< SpaceType > >
 

Public Member Functions

 TypedSpaceInformation (const SpacePtr &space)
 
const SpaceTypegetTypedStateSpace () const
 
SpaceTypegetTypedStateSpace ()
 
StateTypeallocTypedState () const
 
void allocTypedStates (std::vector< StateType *> &states) const
 
void freeTypedState (StateType *state) const
 
void freeTypedStates (std::vector< StateType *> &states) const
 
void copyTypedState (StateType *destination, const StateType *source) const
 
StateTypecloneTypedState (const StateType *source) const
 
- Public Member Functions inherited from ompl::base::SpaceInformation
 SpaceInformation (const SpaceInformation &)=delete
 
SpaceInformationoperator= (const SpaceInformation &)=delete
 
 SpaceInformation (StateSpacePtr space)
 Constructor. Sets the instance of the state space to plan with.
 
bool isValid (const State *state) const
 Check if a given state is valid or not.
 
const StateSpacePtrgetStateSpace () const
 Return the instance of the used state space.
 
unsigned int getStateDimension () const
 Return the dimension of the state space.
 
double getSpaceMeasure () const
 Get a measure of the space (this can be thought of as a generalization of volume)
 
bool equalStates (const State *state1, const State *state2) const
 Check if two states are the same.
 
bool satisfiesBounds (const State *state) const
 Check if a state is inside the bounding box.
 
double distance (const State *state1, const State *state2) const
 Compute the distance between two states.
 
void enforceBounds (State *state) const
 Bring the state within the bounds of the state space.
 
void printState (const State *state, std::ostream &out=std::cout) const
 Print a state to a stream.
 
void setStateValidityChecker (const StateValidityCheckerPtr &svc)
 Set the instance of the state validity checker to use. Parallel implementations of planners assume this validity checker is thread safe.
 
void setStateValidityChecker (const StateValidityCheckerFn &svc)
 If no state validity checking class is specified (StateValidityChecker), a function can be specified instead. This version however incurs a small additional overhead when calling the function, since there is one more level of indirection.
 
const StateValidityCheckerPtrgetStateValidityChecker () const
 Return the instance of the used state validity checker.
 
void setMotionValidator (const MotionValidatorPtr &mv)
 Set the instance of the motion validity checker to use. Parallel implementations of planners assume this validity checker is thread safe.
 
const MotionValidatorPtrgetMotionValidator () const
 Return the instance of the used state validity checker.
 
MotionValidatorPtrgetMotionValidator ()
 Return the non-const instance of the used state validity checker.
 
void setStateValidityCheckingResolution (double resolution)
 Set the resolution at which state validity needs to be verified in order for a motion between two states to be considered valid. This value is specified as a fraction of the space's extent. This call is only applicable if a ompl::base::DiscreteMotionValidator is used. See State Validity Checking.
 
double getStateValidityCheckingResolution () const
 Get the resolution at which state validity is verified. This call is only applicable if a ompl::base::DiscreteMotionValidator is used. See State Validity Checking.
 
StateallocState () const
 Allocate memory for a state.
 
void allocStates (std::vector< State *> &states) const
 Allocate memory for each element of the array states.
 
void freeState (State *state) const
 Free the memory of a state.
 
void freeStates (std::vector< State *> &states) const
 Free the memory of an array of states.
 
void copyState (State *destination, const State *source) const
 Copy a state to another.
 
StatecloneState (const State *source) const
 Clone a state.
 
StateSamplerPtr allocStateSampler () const
 Allocate a uniform state sampler for the state space.
 
ValidStateSamplerPtr allocValidStateSampler () const
 Allocate an instance of a valid state sampler for this space. If setValidStateSamplerAllocator() was previously called, the specified allocator is used to produce the state sampler. Otherwise, a ompl::base::UniformValidStateSampler() is allocated.
 
void setValidStateSamplerAllocator (const ValidStateSamplerAllocator &vssa)
 Set the allocator to use for a valid state sampler. This replaces the default uniform valid state sampler. This call can be made at any time, but it should not be changed while ompl::base::Planner::solve() is executing.
 
void clearValidStateSamplerAllocator ()
 Clear the allocator used for the valid state sampler. This will revert to using the uniform valid state sampler (the default).
 
double getMaximumExtent () const
 Get the maximum extent of the space we are planning in. This is the maximum distance that could be reported between any two given states.
 
bool searchValidNearby (State *state, const State *near, double distance, unsigned int attempts) const
 Find a valid state near a given one. If the given state is valid, it will be returned itself. The two passed state pointers need not point to different memory. Returns true on success. More...
 
bool searchValidNearby (const ValidStateSamplerPtr &sampler, State *state, const State *near, double distance) const
 Find a valid state near a given one. If the given state is valid, it will be returned itself. The two passed state pointers need not point to different memory. Returns true on success. More...
 
unsigned int randomBounceMotion (const StateSamplerPtr &sss, const State *start, unsigned int steps, std::vector< State *> &states, bool alloc) const
 Produce a valid motion starting at start by randomly bouncing off of invalid states. The start state start is not included in the computed motion (states). Returns the number of elements written to states (less or equal to steps). More...
 
bool checkMotion (const State *s1, const State *s2, std::pair< State *, double > &lastValid) const
 Incrementally check if the path between two motions is valid. Also compute the last state that was valid and the time of that state. The time is used to parametrize the motion from s1 to s2, s1 being at t = 0 and s2 being at t = 1. This function assumes s1 is valid. More...
 
bool checkMotion (const State *s1, const State *s2) const
 Check if the path between two states (from s1 to s2) is valid, using the MotionValidator. This function assumes s1 is valid.
 
bool checkMotion (const std::vector< State *> &states, unsigned int count, unsigned int &firstInvalidStateIndex) const
 Incrementally check if a sequence of states is valid. Given a vector of states, this routine only checks the first count elements and marks the index of the first invalid state. More...
 
bool checkMotion (const std::vector< State *> &states, unsigned int count) const
 Check if a sequence of states is valid using subdivision.
 
unsigned int getMotionStates (const State *s1, const State *s2, std::vector< State *> &states, unsigned int count, bool endpoints, bool alloc) const
 Get count states that make up a motion between s1 and s2. Returns the number of states that were added to states. If states.size() >= count or alloc is true, the returned value is equal to count (or count + 2, if endpoints is true). Otherwise, fewer states can be returned. More...
 
unsigned int getCheckedMotionCount () const
 Get the total number of motion segments checked by the MotionValidator so far.
 
double probabilityOfValidState (unsigned int attempts) const
 Estimate probability of sampling a valid state. setup() is assumed to have been called.
 
double averageValidMotionLength (unsigned int attempts) const
 Estimate the length of a valid motion. setup() is assumed to have been called.
 
void samplesPerSecond (double &uniform, double &near, double &gaussian, unsigned int attempts) const
 Estimate the number of samples that can be drawn per second, using the sampler returned by allocStateSampler()
 
virtual void printSettings (std::ostream &out=std::cout) const
 Print information about the current instance of the state space.
 
virtual void printProperties (std::ostream &out=std::cout) const
 Print properties of the current instance of the state space.
 
ParamSetparams ()
 Get the combined parameters for the classes that the space information manages.
 
const ParamSetparams () const
 Get the combined parameters for the classes that the space information manages.
 
virtual void setup ()
 Perform additional setup tasks (run once, before use). If state validity checking resolution has not been set, estimateMaxResolution() is called to estimate it.
 
bool isSetup () const
 Return true if setup was called.
 

Static Public Member Functions

static StateTypestate_as (ompl::base::State *s)
 
static const StateTypestate_as (const ompl::base::State *s)
 

Additional Inherited Members

- Protected Member Functions inherited from ompl::base::SpaceInformation
void setDefaultMotionValidator ()
 Set default motion validator for the state space.
 
- Protected Attributes inherited from ompl::base::SpaceInformation
StateSpacePtr stateSpace_
 The state space planning is to be performed in.
 
StateValidityCheckerPtr stateValidityChecker_
 The instance of the state validity checker used for determining the validity of states in the planning process.
 
MotionValidatorPtr motionValidator_
 The instance of the motion validator to use when determining the validity of motions in the planning process.
 
bool setup_
 Flag indicating whether setup() has been called on this instance.
 
ValidStateSamplerAllocator vssa_
 The optional valid state sampler allocator.
 
ParamSet params_
 Combined parameters for the contained classes.
 

Detailed Description

template<typename SpaceType_>
class ompl::base::TypedSpaceInformation< SpaceType_ >

Definition at line 48 of file TypedSpaceInformation.h.

Member Typedef Documentation

◆ Ptr

template<typename SpaceType_ >
using ompl::base::TypedSpaceInformation< SpaceType_ >::Ptr = std::shared_ptr<TypedSpaceInformation<SpaceType> >

Shared pointer to the typed space.

Definition at line 66 of file TypedSpaceInformation.h.

◆ ScopedStateType

template<typename SpaceType_ >
using ompl::base::TypedSpaceInformation< SpaceType_ >::ScopedStateType = ScopedState<SpaceType>

The actual type for a Scoped State.

Definition at line 60 of file TypedSpaceInformation.h.

◆ SpacePtr

template<typename SpaceType_ >
using ompl::base::TypedSpaceInformation< SpaceType_ >::SpacePtr = std::shared_ptr<SpaceType>

Shared Pointer to the actual type of the space.

Definition at line 63 of file TypedSpaceInformation.h.

◆ SpaceType

template<typename SpaceType_ >
using ompl::base::TypedSpaceInformation< SpaceType_ >::SpaceType = SpaceType_

The actual type of the state space

Definition at line 54 of file TypedSpaceInformation.h.

◆ StateType

template<typename SpaceType_ >
using ompl::base::TypedSpaceInformation< SpaceType_ >::StateType = typename SpaceType::StateType

The actual type of states in the space.

Definition at line 57 of file TypedSpaceInformation.h.

Constructor & Destructor Documentation

◆ TypedSpaceInformation()

template<typename SpaceType_ >
ompl::base::TypedSpaceInformation< SpaceType_ >::TypedSpaceInformation ( const SpacePtr space)
inline

Construct from shared pointer to the actual space.

Definition at line 71 of file TypedSpaceInformation.h.

Member Function Documentation

◆ allocTypedState()

template<typename SpaceType_ >
StateType* ompl::base::TypedSpaceInformation< SpaceType_ >::allocTypedState ( ) const
inline

Allocate a state of the proper type.

Definition at line 92 of file TypedSpaceInformation.h.

◆ allocTypedStates()

template<typename SpaceType_ >
void ompl::base::TypedSpaceInformation< SpaceType_ >::allocTypedStates ( std::vector< StateType *> &  states) const
inline

Allocate memory for typed states in array

Definition at line 98 of file TypedSpaceInformation.h.

◆ cloneTypedState()

template<typename SpaceType_ >
StateType* ompl::base::TypedSpaceInformation< SpaceType_ >::cloneTypedState ( const StateType source) const
inline

Clone a state of the proper type.

Definition at line 122 of file TypedSpaceInformation.h.

◆ copyTypedState()

template<typename SpaceType_ >
void ompl::base::TypedSpaceInformation< SpaceType_ >::copyTypedState ( StateType destination,
const StateType source 
) const
inline

Copy a state of the proper type.

Definition at line 116 of file TypedSpaceInformation.h.

◆ freeTypedState()

template<typename SpaceType_ >
void ompl::base::TypedSpaceInformation< SpaceType_ >::freeTypedState ( StateType state) const
inline

Free a state of the proper type.

Definition at line 104 of file TypedSpaceInformation.h.

◆ freeTypedStates()

template<typename SpaceType_ >
void ompl::base::TypedSpaceInformation< SpaceType_ >::freeTypedStates ( std::vector< StateType *> &  states) const
inline

Free typed states in array

Definition at line 110 of file TypedSpaceInformation.h.

◆ getTypedStateSpace() [1/2]

template<typename SpaceType_ >
const SpaceType* ompl::base::TypedSpaceInformation< SpaceType_ >::getTypedStateSpace ( ) const
inline

Get space pointer of the proper type, const.

Definition at line 78 of file TypedSpaceInformation.h.

◆ getTypedStateSpace() [2/2]

template<typename SpaceType_ >
SpaceType* ompl::base::TypedSpaceInformation< SpaceType_ >::getTypedStateSpace ( )
inline

Get space pointer of the proper type.

Definition at line 84 of file TypedSpaceInformation.h.


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