SpaceInformation.h
134 }
152 }
158 }
164 }
170 }
231 void propagate(const base::State *state, const Control *control, int steps, base::State *result) const;
void copyControl(Control *destination, const Control *source) const
Copy a control to another.
Definition: SpaceInformation.h:164
Control * cloneControl(const Control *source) const
Clone a control.
Definition: SpaceInformation.h:170
void setStatePropagator(const StatePropagatorFn &fn)
Set the function that performs state propagation.
Definition: SpaceInformation.cpp:117
SpaceInformation(const base::StateSpacePtr &stateSpace, ControlSpacePtr controlSpace)
Constructor. Sets the instance of the state and control spaces to plan with.
Definition: SpaceInformation.cpp:45
A shared pointer wrapper for ompl::control::ControlSpace.
DirectedControlSamplerPtr allocDirectedControlSampler() const
Allocate an instance of the DirectedControlSampler to use. This will be the default (SimpleDirectedCo...
Definition: SpaceInformation.cpp:95
void setDirectedControlSamplerAllocator(const DirectedControlSamplerAllocator &dcsa)
Set the allocator to use for the DirectedControlSampler.
Definition: SpaceInformation.cpp:105
unsigned int getMinControlDuration() const
Get the minimum number of steps a control is propagated for.
Definition: SpaceInformation.h:231
std::function< DirectedControlSamplerPtr(const SpaceInformation *)> DirectedControlSamplerAllocator
Definition of a function that can allocate a directed control sampler.
Definition: DirectedControlSampler.h:167
ControlSpacePtr controlSpace_
The control space describing the space of controls applicable to states in the state space.
Definition: SpaceInformation.h:364
const StatePropagatorPtr & getStatePropagator() const
Get the instance of StatePropagator that performs state propagation.
Definition: SpaceInformation.h:259
void declareParams()
Definition: SpaceInformation.cpp:52
std::function< void(const base::State *, const Control *, const double, base::State *)> StatePropagatorFn
A function that achieves state propagation.
Definition: SpaceInformation.h:130
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:195
DirectedControlSamplerAllocator dcsa_
Optional allocator for the DirectedControlSampler. If not specified, the default implementation is us...
Definition: SpaceInformation.h:377
void setMinControlDuration(unsigned int minSteps)
Set the minimum number of steps a control is propagated for.
Definition: SpaceInformation.h:219
void setMaxControlDuration(unsigned int maxSteps)
Set the minimum and maximum number of steps a control is propagated for.
Definition: SpaceInformation.h:225
void setMinMaxControlDuration(unsigned int minSteps, unsigned int maxSteps)
Set the minimum and maximum number of steps a control is propagated for.
Definition: SpaceInformation.h:212
void printSettings(std::ostream &out=std::cout) const override
Print information about the current instance of the state space.
Definition: SpaceInformation.cpp:315
unsigned int getMaxControlDuration() const
Get the maximum number of steps a control is propagated for.
Definition: SpaceInformation.h:237
void freeControl(Control *control) const
Free the memory of a control.
Definition: SpaceInformation.h:158
A shared pointer wrapper for ompl::control::ControlSampler.
bool equalControls(const Control *control1, const Control *control2) const
Check if two controls are the same.
Definition: SpaceInformation.h:189
unsigned int minSteps_
The minimum number of steps to apply a control for.
Definition: SpaceInformation.h:370
A shared pointer wrapper for ompl::control::DirectedControlSampler.
void printControl(const Control *control, std::ostream &out=std::cout) const
Print a control to a stream.
Definition: SpaceInformation.h:183
double getPropagationStepSize() const
Propagation is performed at integer multiples of a specified step size. This function returns the val...
Definition: SpaceInformation.h:279
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:149
A shared pointer wrapper for ompl::control::StatePropagator.
const ControlSpacePtr & getControlSpace() const
Get the control space.
Definition: SpaceInformation.h:143
StatePropagatorPtr statePropagator_
The state propagator used to model the motion of the system being planned for.
Definition: SpaceInformation.h:367
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:272
void clearDirectedSamplerAllocator()
Reset the DirectedControlSampler to be the default one.
Definition: SpaceInformation.cpp:111
ControlSamplerPtr allocControlSampler() const
Allocate a control sampler.
Definition: SpaceInformation.h:206
unsigned int maxSteps_
The maximum number of steps to apply a control for.
Definition: SpaceInformation.h:373
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:168
bool canPropagateBackward() const
Some systems can only propagate forward in time (i.e., the steps argument for the propagate() functio...
Definition: SpaceInformation.cpp:144
void setup() override
Perform additional setup tasks (run once, before use)
Definition: SpaceInformation.cpp:65