CForestStateSpaceWrapper.h
167 void interpolate(const State *from, const State *to, const double t, State *state) const override
void setName(const std::string &name)
Set the name of the state space.
Definition: StateSpace.cpp:212
void serialize(void *serialization, const State *state) const override
Write the binary representation of state to serialization.
Definition: CForestStateSpaceWrapper.h:155
State * allocState() const override
Allocate a state that can store a point in the described space.
Definition: CForestStateSpaceWrapper.h:171
bool hasSymmetricInterpolate() const override
Check if the interpolation function on this state space is symmetric, i.e. interpolate(from, to, t, state) = interpolate(to, from, 1-t, state). Default implementation returns true.
Definition: CForestStateSpaceWrapper.h:107
void computeLocations() override
Compute the location information for various components of the state space. Either this function or s...
Definition: CForestStateSpaceWrapper.h:211
StateSamplerPtr allocSubspaceStateSampler(const StateSpace *subspace) const override
Allocate a sampler that actually samples only components that are part of subspace.
Definition: CForestStateSpaceWrapper.h:207
double getMaximumExtent() const override
Get the maximum value a call to distance() can return (or an upper bound). For unbounded state spaces...
Definition: CForestStateSpaceWrapper.h:127
bool isDiscrete() const override
Check if the set of states is discrete.
Definition: CForestStateSpaceWrapper.h:91
StateSamplerPtr allocSubspaceStateSampler(const StateSpacePtr &subspace) const
Allocate a sampler that actually samples only components that are part of subspace.
double getMeasure() const override
Get a measure of the space (this can be thought of as a generalization of volume) ...
Definition: CForestStateSpaceWrapper.h:131
void interpolate(const State *from, const State *to, const double t, State *state) const override
Computes the state that lies at time t in [0, 1] on the segment that connects from state to to state...
Definition: CForestStateSpaceWrapper.h:167
bool satisfiesBounds(const State *state) const override
Check if a state is inside the bounding box. For unbounded spaces this function can always return tru...
Definition: CForestStateSpaceWrapper.h:139
A shared pointer wrapper for ompl::base::StateSampler.
void freeState(State *state) const override
Free the memory of the allocated state.
Definition: CForestStateSpaceWrapper.h:175
void sanityChecks() const override
Convenience function that allows derived state spaces to choose which checks should pass (see SanityC...
Definition: CForestStateSpaceWrapper.h:203
virtual unsigned int getDimension() const =0
Get the dimension of the space (not the dimension of the surrounding ambient space) ...
void copyState(State *destination, const State *source) const override
Copy a state to another. The memory of source and destination should NOT overlap. ...
Definition: CForestStateSpaceWrapper.h:143
unsigned int validSegmentCount(const State *state1, const State *state2) const override
Count how many segments of the "longest valid length" fit on the motion from state1 to state2...
Definition: CForestStateSpaceWrapper.h:119
double * getValueAddressAtIndex(State *state, const unsigned int index) const override
Many states contain a number of double values. This function provides a means to get the memory addre...
Definition: CForestStateSpaceWrapper.h:179
State space wrapper to use together with CForest. It adds some functionalities to the regular state s...
Definition: CForestStateSpaceWrapper.h:55
virtual void serialize(void *serialization, const State *state) const
Write the binary representation of state to serialization.
Definition: StateSpace.cpp:387
void setup() override
Perform final setup steps. This function is automatically called by the SpaceInformation. If any default projections are to be registered, this call will set them and call their setup() functions. It is safe to call this function multiple times. At a subsequent call, projections that have been previously user configured are not re-instantiated, but their setup() method is still called.
Definition: CForestStateSpaceWrapper.cpp:54
virtual void computeLocations()
Compute the location information for various components of the state space. Either this function or s...
Definition: StateSpace.cpp:225
void printProjections(std::ostream &out) const override
Print the list of registered projections. This function is also called by printSettings() ...
Definition: CForestStateSpaceWrapper.h:195
void registerProjections() override
Register the projections for this state space. Usually, this is at least the default projection...
Definition: CForestStateSpaceWrapper.h:183
virtual void registerProjections()
Register the projections for this state space. Usually, this is at least the default projection...
Definition: StateSpace.cpp:244
bool isHybrid() const override
Check if this is a hybrid state space (i.e., both discrete and continuous components exist) ...
Definition: CForestStateSpaceWrapper.h:95
virtual bool hasSymmetricInterpolate() const
Check if the interpolation function on this state space is symmetric, i.e. interpolate(from, to, t, state) = interpolate(to, from, 1-t, state). Default implementation returns true.
virtual void deserialize(State *state, const void *serialization) const
Read the binary representation of a state from serialization and write it to state.
Definition: StateSpace.cpp:391
void printState(const State *state, std::ostream &out) const override
Print a state to a stream.
Definition: CForestStateSpaceWrapper.h:187
void enforceBounds(State *state) const override
Bring the state within the bounds of the state space. For unbounded spaces this function can be a no-...
Definition: CForestStateSpaceWrapper.h:135
virtual void printSettings(std::ostream &out) const
Print the settings for this state space to a stream.
Definition: StateSpace.cpp:400
virtual void printState(const State *state, std::ostream &out=std::cout) const
Print a state to a stream.
Definition: StateSpace.cpp:395
virtual void interpolate(const State *from, const State *to, double t, State *state) const =0
Computes the state that lies at time t in [0, 1] on the segment that connects from state to to state...
virtual bool isCompound() const
Check if the state space is compound.
virtual bool isDiscrete() const
Check if the set of states is discrete.
bool isCompound() const override
Check if the state space is compound.
Definition: CForestStateSpaceWrapper.h:87
virtual unsigned int getSerializationLength() const
Get the number of chars in the serialization of a state in this space.
Definition: StateSpace.cpp:382
Representation of a space in which planning can be performed. Topology specific sampling, interpolation and distance are defined.
Definition: StateSpace.h:70
virtual bool satisfiesBounds(const State *state) const =0
Check if a state is inside the bounding box. For unbounded spaces this function can always return tru...
virtual double * getValueAddressAtIndex(State *state, unsigned int index) const
Many states contain a number of double values. This function provides a means to get the memory addre...
Definition: StateSpace.cpp:317
virtual void sanityChecks(double zero, double eps, unsigned int flags) const
Perform sanity checks for this state space. Throws an exception if failures are found.
void printSettings(std::ostream &out) const override
Print the settings for this state space to a stream.
Definition: CForestStateSpaceWrapper.h:191
virtual double getMeasure() const =0
Get a measure of the space (this can be thought of as a generalization of volume) ...
StateSamplerPtr allocDefaultStateSampler() const override
Allocate an instance of the default uniform state sampler for this space.
Definition: CForestStateSpaceWrapper.cpp:40
void sanityChecks(double zero, double eps, unsigned int flags) const override
Perform sanity checks for this state space. Throws an exception if failures are found.
Definition: CForestStateSpaceWrapper.h:199
unsigned int getSerializationLength() const override
Get the number of chars in the serialization of a state in this space.
Definition: CForestStateSpaceWrapper.h:151
virtual void enforceBounds(State *state) const =0
Bring the state within the bounds of the state space. For unbounded spaces this function can be a no-...
void setLongestValidSegmentFraction(double segmentFraction) override
When performing discrete validation of motions, the length of the longest segment that does not requi...
Definition: CForestStateSpaceWrapper.h:115
virtual bool isMetricSpace() const
Return true if the distance function associated with the space is a metric.
Definition: StateSpace.h:183
void deserialize(State *state, const void *serialization) const override
Read the binary representation of a state from serialization and write it to state.
Definition: CForestStateSpaceWrapper.h:159
virtual bool equalStates(const State *state1, const State *state2) const =0
Checks whether two states are equal.
virtual void printProjections(std::ostream &out) const
Print the list of registered projections. This function is also called by printSettings() ...
Definition: StateSpace.cpp:406
virtual double distance(const State *state1, const State *state2) const =0
Computes distance between two states. This function satisfies the properties of a metric if isMetricS...
virtual bool isHybrid() const
Check if this is a hybrid state space (i.e., both discrete and continuous components exist) ...
virtual bool hasSymmetricDistance() const
Check if the distance function on this state space is symmetric, i.e. distance(s1,s2) = distance(s2,s1). Default implementation returns true.
double distance(const State *state1, const State *state2) const override
Computes distance between two states. This function satisfies the properties of a metric if isMetricS...
Definition: CForestStateSpaceWrapper.h:147
virtual void setLongestValidSegmentFraction(double segmentFraction)
When performing discrete validation of motions, the length of the longest segment that does not requi...
virtual void freeState(State *state) const =0
Free the memory of the allocated state.
double getLongestValidSegmentFraction() const override
When performing discrete validation of motions, the length of the longest segment that does not requi...
Definition: CForestStateSpaceWrapper.h:111
virtual void copyState(State *destination, const State *source) const =0
Copy a state to another. The memory of source and destination should NOT overlap. ...
bool isMetricSpace() const override
Return true if the distance function associated with the space is a metric.
Definition: CForestStateSpaceWrapper.h:99
bool hasSymmetricDistance() const override
Check if the distance function on this state space is symmetric, i.e. distance(s1,s2) = distance(s2,s1). Default implementation returns true.
Definition: CForestStateSpaceWrapper.h:103
virtual State * allocState() const =0
Allocate a state that can store a point in the described space.
virtual unsigned int validSegmentCount(const State *state1, const State *state2) const
Count how many segments of the "longest valid length" fit on the motion from state1 to state2...
bool equalStates(const State *state1, const State *state2) const override
Checks whether two states are equal.
Definition: CForestStateSpaceWrapper.h:163
StateSamplerPtr allocStateSampler() const override
Allocate an instance of the state sampler for this space. This sampler will be allocated with the sam...
Definition: CForestStateSpaceWrapper.cpp:47
virtual double getLongestValidSegmentFraction() const
When performing discrete validation of motions, the length of the longest segment that does not requi...
unsigned int getDimension() const override
Get the dimension of the space (not the dimension of the surrounding ambient space) ...
Definition: CForestStateSpaceWrapper.h:123
virtual double getMaximumExtent() const =0
Get the maximum value a call to distance() can return (or an upper bound). For unbounded state spaces...