OpenDEStateSpace.cpp
56 addSubspace(base::StateSpacePtr(new base::RealVectorStateSpace(3)), linVelWeight); // linear velocity
59 addSubspace(base::StateSpacePtr(new base::RealVectorStateSpace(3)), angVelWeight); // angular velocity
150 void ompl::control::OpenDEStateSpace::copyState(base::State *destination, const base::State *source) const
211 bool ompl::control::OpenDEStateSpace::satisfiesBoundsExceptRotation(const StateType *state) const
226 void ompl::control::OpenDEStateSpace::setLinearVelocityBounds(const base::RealVectorBounds &bounds)
232 void ompl::control::OpenDEStateSpace::setAngularVelocityBounds(const base::RealVectorBounds &bounds)
250 // this function should most likely not be used with OpenDE propagations, but just in case it is called, we need to make sure the collision information
252 void ompl::control::OpenDEStateSpace::interpolate(const base::State *from, const base::State *to, const double t, base::State *state) const
263 // we need to make sure any collision information is cleared when states are sampled (just in case this ever happens)
267 WrapperForOpenDESampler(const base::StateSpace *space, const base::StateSamplerPtr &wrapped) : base::StateSampler(space), wrapped_(wrapped)
277 virtual void sampleUniformNear(base::State *state, const base::State *near, const double distance)
Index of bit in StateType::collision indicating whether it is known if a state is in collision or not...
Definition: OpenDEStateSpace.h:58
void setName(const std::string &name)
Set the name of the state space.
Definition: StateSpace.cpp:203
virtual void writeState(const base::State *state) const
Set the parameters of the OpenDE bodies to be the ones read from state. The code will technically wor...
Definition: OpenDEStateSpace.cpp:342
void setVolumeBounds(const base::RealVectorBounds &bounds)
Set the bounds for each of the position subspaces.
Definition: OpenDEStateSpace.cpp:220
virtual StateSamplerPtr allocDefaultStateSampler() const
Allocate an instance of the default uniform state sampler for this space.
Definition: StateSpace.cpp:1102
virtual bool evaluateCollision(const base::State *source) const
Fill the OpenDEStateSpace::STATE_COLLISION_VALUE_BIT of StateType::collision member of a state...
Definition: OpenDEStateSpace.cpp:195
A boost shared pointer wrapper for ompl::base::StateSpace.
A boost shared pointer wrapper for ompl::base::StateSampler.
virtual void interpolate(const base::State *from, const base::State *to, const double t, base::State *state) const
Computes the state that lies at time t in [0, 1] on the segment that connects from state to to state...
Definition: OpenDEStateSpace.cpp:252
void lock()
Lock this state space. This means no further spaces can be added as components. This function can be ...
Definition: StateSpace.cpp:1146
Index of bit in StateType::collision indicating whether a state is in collision or not...
Definition: OpenDEStateSpace.h:60
void setAngularVelocityBounds(const base::RealVectorBounds &bounds)
Set the bounds for each of the angular velocity subspaces.
Definition: OpenDEStateSpace.cpp:232
A state space representing SO(3). The internal representation is done with quaternions. The distance between states is the angle between quaternions and interpolation is done with slerp.
Definition: SO3StateSpace.h:84
virtual base::State * allocState() const
Allocate a state that can store a point in the described space.
Definition: OpenDEStateSpace.cpp:238
CompoundState StateType
Define the type of state allocated by this state space.
Definition: StateSpace.h:549
virtual void copyState(base::State *destination, const base::State *source) const
Copy a state to another. The memory of source and destination should NOT overlap. ...
Definition: OpenDEStateSpace.cpp:150
OpenDE State. This is a compound state that allows accessing the properties of the bodies the state s...
Definition: OpenDEStateSpace.h:68
const T * as(const unsigned int index) const
Cast a component of this instance to a desired type.
Definition: State.h:109
virtual base::StateSamplerPtr allocDefaultStateSampler() const
Allocate an instance of the default uniform state sampler for this space.
Definition: OpenDEStateSpace.cpp:295
This class contains the OpenDE constructs OMPL needs to know about when planning. ...
Definition: OpenDEEnvironment.h:67
void setLow(double value)
Set the lower bound in each dimension to a specific value.
Definition: RealVectorBounds.cpp:42
void setHigh(double value)
Set the upper bound in each dimension to a specific value.
Definition: RealVectorBounds.cpp:47
virtual bool satisfiesBounds(const State *state) const
Check if a state is inside the bounding box. For unbounded spaces this function can always return tru...
Definition: StateSpace.cpp:1005
bool satisfiesBoundsExceptRotation(const StateType *state) const
This is a convenience function provided for optimization purposes. It checks whether a state satisfie...
Definition: OpenDEStateSpace.cpp:211
void setDefaultBounds()
By default, the volume bounds enclosing the geometry of the environment are computed to include all o...
Definition: OpenDEStateSpace.cpp:69
The definition of a state in SO(3) represented as a unit quaternion.
Definition: SO3StateSpace.h:94
virtual StateSamplerPtr allocStateSampler() const
Allocate an instance of the state sampler for this space. This sampler will be allocated with the sam...
Definition: StateSpace.cpp:785
OpenDEStateSpace(const OpenDEEnvironmentPtr &env, double positionWeight=1.0, double linVelWeight=0.5, double angVelWeight=0.5, double orientationWeight=1.0)
Construct a state space representing OpenDE states.
Definition: OpenDEStateSpace.cpp:43
A state space representing Rn. The distance function is the L2 norm.
Definition: RealVectorStateSpace.h:75
Representation of a space in which planning can be performed. Topology specific sampling, interpolation and distance are defined.
Definition: StateSpace.h:73
void addSubspace(const StateSpacePtr &component, double weight)
Adds a new state space as part of the compound state space. For computing distances within the compou...
Definition: StateSpace.cpp:855
virtual double distance(const State *state1, const State *state2) const
Computes distance between two states. This function satisfies the properties of a metric if isMetricS...
Definition: StateSpace.cpp:1052
virtual base::StateSamplerPtr allocStateSampler() const
Allocate an instance of the state sampler for this space. This sampler will be allocated with the sam...
Definition: OpenDEStateSpace.cpp:301
The lower and upper bounds for an Rn space.
Definition: RealVectorBounds.h:48
The definition of a state in Rn
Definition: RealVectorStateSpace.h:80
virtual void freeState(base::State *state) const
Free the memory of the allocated state.
Definition: OpenDEStateSpace.cpp:245
Number of state space types; To add new types, use values that are larger than the count...
Definition: StateSpaceTypes.h:75
void setLinearVelocityBounds(const base::RealVectorBounds &bounds)
Set the bounds for each of the linear velocity subspaces.
Definition: OpenDEStateSpace.cpp:226
void allocStateComponents(CompoundState *state) const
Allocate the state components. Called by allocState(). Usually called by derived state spaces...
Definition: StateSpace.cpp:1130
std::vector< StateSpacePtr > components_
The state spaces that make up the compound state space.
Definition: StateSpace.h:707
A boost shared pointer wrapper for ompl::control::OpenDEEnvironment.
virtual void readState(base::State *state) const
Read the parameters of the OpenDE bodies and store them in state.
Definition: OpenDEStateSpace.cpp:310
OpenDEEnvironmentPtr env_
Representation of the OpenDE parameters OMPL needs to plan.
Definition: OpenDEStateSpace.h:218