SpaceInformation.h
66 typedef boost::function<void(const base::State*, const Control*, const double, base::State*)> StatePropagatorFn;
221 void propagate(const base::State *state, const Control *control, int steps, base::State *result) const;
236 unsigned int propagateWhileValid(const base::State *state, const Control *control, int steps, base::State *result) const;
246 void propagate(const base::State *state, const Control *control, int steps, std::vector<base::State*> &result, bool alloc) const;
260 unsigned int propagateWhileValid(const base::State *state, const Control *control, int steps, std::vector<base::State*> &result, bool alloc) const;
DirectedControlSamplerPtr allocDirectedControlSampler() const
Allocate an instance of the DirectedControlSampler to use. This will be the default (SimpleDirectedCo...
Definition: SpaceInformation.cpp:74
ControlSpacePtr controlSpace_
The control space describing the space of controls applicable to states in the state space...
Definition: SpaceInformation.h:273
double getPropagationStepSize() const
Propagation is performed at integer multiples of a specified step size. This function returns the val...
Definition: SpaceInformation.h:207
unsigned int getMinControlDuration() const
Get the minimum number of steps a control is propagated for.
Definition: SpaceInformation.h:161
boost::function< void(const base::State *, const Control *, const double, base::State *)> StatePropagatorFn
A function that achieves state propagation.
Definition: SpaceInformation.h:66
unsigned int propagateWhileValid(const base::State *state, const Control *control, int steps, base::State *result) const
Propagate the model of the system forward, starting at a given state, with a given control...
Definition: SpaceInformation.cpp:147
void nullControl(Control *control) const
Make the control have no effect if it were to be applied to a state for any amount of time...
Definition: SpaceInformation.h:137
A boost shared pointer wrapper for ompl::base::StateSpace.
A boost shared pointer wrapper for ompl::control::ControlSampler.
StatePropagatorPtr statePropagator_
The state propagator used to model the motion of the system being planned for.
Definition: SpaceInformation.h:276
ControlSamplerPtr allocControlSampler() const
Allocate a control sampler.
Definition: SpaceInformation.h:148
bool equalControls(const Control *control1, const Control *control2) const
Check if two controls are the same.
Definition: SpaceInformation.h:131
DirectedControlSamplerAllocator dcsa_
Optional allocator for the DirectedControlSampler. If not specified, the default implementation is us...
Definition: SpaceInformation.h:285
A boost shared pointer wrapper for ompl::control::ControlSpace.
boost::function< DirectedControlSamplerPtr(const SpaceInformation *)> DirectedControlSamplerAllocator
Definition of a function that can allocate a directed control sampler.
Definition: DirectedControlSampler.h:104
bool canPropagateBackward() const
Some systems can only propagate forward in time (i.e., the steps argument for the propagate() functio...
Definition: SpaceInformation.cpp:124
void propagate(const base::State *state, const Control *control, int steps, base::State *result) const
Propagate the model of the system forward, starting a a given state, with a given control...
Definition: SpaceInformation.cpp:129
void copyControl(Control *destination, const Control *source) const
Copy a control to another.
Definition: SpaceInformation.h:106
void setDirectedControlSamplerAllocator(const DirectedControlSamplerAllocator &dcsa)
Set the allocator to use for the DirectedControlSampler.
Definition: SpaceInformation.cpp:83
A boost shared pointer wrapper for ompl::control::DirectedControlSampler.
unsigned int getMaxControlDuration() const
Get the maximum number of steps a control is propagated for.
Definition: SpaceInformation.h:167
Control * cloneControl(const Control *source) const
Clone a control.
Definition: SpaceInformation.h:112
void clearDirectedSamplerAllocator()
Reset the DirectedControlSampler to be the default one.
Definition: SpaceInformation.cpp:89
SpaceInformation(const base::StateSpacePtr &stateSpace, const ControlSpacePtr &controlSpace)
Constructor. Sets the instance of the state and control spaces to plan with.
Definition: SpaceInformation.h:74
The base class for space information. This contains all the information about the space planning is d...
Definition: SpaceInformation.h:86
unsigned int maxSteps_
The maximum number of steps to apply a control for.
Definition: SpaceInformation.h:282
unsigned int minSteps_
The minimum number of steps to apply a control for.
Definition: SpaceInformation.h:279
void setPropagationStepSize(double stepSize)
When controls are applied to states, they are applied for a time duration that is an integer multiple...
Definition: SpaceInformation.h:201
virtual void printSettings(std::ostream &out=std::cout) const
Print information about the current instance of the state space.
Definition: SpaceInformation.cpp:294
void setMinMaxControlDuration(unsigned int minSteps, unsigned int maxSteps)
Set the minimum and maximum number of steps a control is propagated for.
Definition: SpaceInformation.h:154
void setStatePropagator(const StatePropagatorFn &fn)
Set the function that performs state propagation.
Definition: SpaceInformation.cpp:95
void freeControl(Control *control) const
Free the memory of a control.
Definition: SpaceInformation.h:100
const ControlSpacePtr & getControlSpace() const
Get the control space.
Definition: SpaceInformation.h:85
Space information containing necessary information for planning with controls. setup() needs to be ca...
Definition: SpaceInformation.h:69
const StatePropagatorPtr & getStatePropagator() const
Get the instance of StatePropagator that performs state propagation.
Definition: SpaceInformation.h:188
virtual void setup()
Perform additional setup tasks (run once, before use)
Definition: SpaceInformation.cpp:45
void printControl(const Control *control, std::ostream &out=std::cout) const
Print a control to a stream.
Definition: SpaceInformation.h:125