37 #ifndef OMPL_BASE_SPACES_SE2_STATE_SPACE_
38 #define OMPL_BASE_SPACES_SE2_STATE_SPACE_
40 #include "ompl/base/StateSpace.h"
41 #include "ompl/base/spaces/RealVectorStateSpace.h"
42 #include "ompl/base/spaces/SO2StateSpace.h"
65 return as<RealVectorStateSpace::StateType>(0)->values[0];
71 return as<RealVectorStateSpace::StateType>(0)->values[1];
79 return as<SO2StateSpace::StateType>(1)->value;
85 as<RealVectorStateSpace::StateType>(0)->values[0] = x;
91 as<RealVectorStateSpace::StateType>(0)->values[1] = y;
106 as<SO2StateSpace::StateType>(1)->value = yaw;
121 virtual ~SE2StateSpace(
void)
128 as<RealVectorStateSpace>(0)->
setBounds(bounds);
134 return as<RealVectorStateSpace>(0)->
getBounds();
void setName(const std::string &name)
Set the name of the state space.
double getX(void) const
Get the X component of the state.
void setBounds(const RealVectorBounds &bounds)
Set the bounds of this state space. This defines the range of the space in which sampling is performe...
int type_
A type assigned for this state space.
A state in SE(2): (x, y, yaw)
Definition of a compound state.
void setX(double x)
Set the X component of the state.
A boost shared pointer wrapper for ompl::base::StateSpace.
CompoundState StateType
Define the type of state allocated by this state space.
double getY(void) const
Get the Y component of the state.
void setYaw(double yaw)
Set the yaw component of the state. This is the rotation in plane, with respect to the Z axis...
virtual void registerProjections(void)
Register the projections for this state space. Usually, this is at least the default projection...
virtual void freeState(State *state) const
Free the memory of the allocated state.
A space to allow the composition of state spaces.
A state space representing SE(2)
void setXY(double x, double y)
Set the X and Y components of the state.
const std::string & getName(void) const
Get the name of the state space.
ompl::base::SE2StateSpace
A state space representing Rn. The distance function is the L2 norm.
virtual State * allocState(void) const
Allocate a state that can store a point in the described space.
Definition of an abstract state.
const RealVectorBounds & getBounds(void) const
Get the bounds for this state space.
void lock(void)
Lock this state space. This means no further spaces can be added as components. This function can be ...
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...
void setY(double y)
Set the Y component of the state.
The lower and upper bounds for an Rn space.
A state space representing SO(2). The distance function and interpolation take into account angle wra...
double getYaw(void) const
Get the yaw component of the state. This is the rotation in plane, with respect to the Z axis...