OpenDESimpleSetup.cpp
41 ompl::control::OpenDESimpleSetup::OpenDESimpleSetup(const ControlSpacePtr &space) : SimpleSetup(space)
55 SimpleSetup(ControlSpacePtr(new OpenDEControlSpace(base::StateSpacePtr(new OpenDEStateSpace(env)))))
62 si_->setPropagationStepSize(getStateSpace()->as<OpenDEStateSpace>()->getEnvironment()->stepSize_);
63 si_->setMinMaxControlDuration(getStateSpace()->as<OpenDEStateSpace>()->getEnvironment()->minControlSteps_,
68 ompl::base::ScopedState<ompl::control::OpenDEStateSpace> ompl::control::OpenDESimpleSetup::getCurrentState() const
90 si_->setStateValidityChecker(base::StateValidityCheckerPtr(new OpenDEStateValidityChecker(si_)));
106 void ompl::control::OpenDESimpleSetup::playPath(const base::PathPtr &path, double timeFactor) const
116 static_cast<PathControl*>(path.get())->asGeometric() : *static_cast<geometric::PathGeometric*>(path.get());
132 ompl::base::PathPtr ompl::control::OpenDESimpleSetup::simulateControl(const double *control, unsigned int steps) const
135 memcpy(c->as<OpenDEControlSpace::ControlType>()->values, control, sizeof(double) * getControlSpace()->getDimension());
141 ompl::base::PathPtr ompl::control::OpenDESimpleSetup::simulateControl(const Control *control, unsigned int steps) const
base::ScopedState< OpenDEStateSpace > getCurrentState() const
Get the current OpenDE state (read parameters from OpenDE bodies)
Definition: OpenDESimpleSetup.cpp:68
std::vector< base::State * > & getStates()
Get the states that make up the path (as a reference, so it can be modified, hence the function is no...
Definition: PathControl.h:129
A boost shared pointer wrapper for ompl::base::StateSpace.
Create the set of classes typically needed to solve a control problem.
Definition: SimpleSetup.h:64
virtual void setup()
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition: OpenDESimpleSetup.cpp:85
std::vector< Control * > & getControls()
Get the controls that make up the path (as a reference, so it can be modified, hence the function is ...
Definition: PathControl.h:135
The simplest state validity checker: all states are valid.
Definition: OpenDEStateValidityChecker.h:49
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathGeometric.h:225
std::size_t getStateCount() const
Get the number of states (way-points) that make up this path.
Definition: PathGeometric.h:237
virtual void setup()
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition: SimpleSetup.cpp:59
void playSolutionPath(double timeFactor=1.0) const
Call playPath() on the solution path, if one is available.
Definition: OpenDESimpleSetup.cpp:100
A boost shared pointer wrapper for ompl::base::StateValidityChecker.
A boost shared pointer wrapper for ompl::control::ControlSpace.
duration seconds(double sec)
Return the time duration representing a given number of seconds.
Definition: Time.h:62
base::PathPtr simulate(unsigned int steps) const
Simulate the OpenDE environment forward for steps simulation steps, using the null control (ompl::con...
Definition: OpenDESimpleSetup.cpp:158
State space representing OpenDE states.
Definition: OpenDEStateSpace.h:51
base::PathPtr simulateControl(const double *control, unsigned int steps) const
Simulate the OpenDE environment forward for steps simulation steps, using the control control...
Definition: OpenDESimpleSetup.cpp:132
The definition of a control in Rn
Definition: RealVectorControlSpace.h:68
OpenDESimpleSetup(const ControlSpacePtr &space)
Constructor needs the control space needed for planning.
Definition: OpenDESimpleSetup.cpp:41
void setCurrentState(const base::ScopedState<> &state)
Set the current OpenDE state (set parameters for OpenDE bodies)
Definition: OpenDESimpleSetup.cpp:80
Representation of controls applied in OpenDE environments. This is an array of double values...
Definition: OpenDEControlSpace.h:51
State propagation with OpenDE. Only forward propagation is possible.
Definition: OpenDEStatePropagator.h:62
std::vector< double > & getControlDurations()
Get the control durations used along the path (as a reference, so it can be modified, hence the function is not const)
Definition: PathControl.h:141
void playPath(const base::PathPtr &path, double timeFactor=1.0) const
Set the OpenDE world to the states that are contained in a given path, sequentially. Using timeFactor, the speed at which this sequence is iterated through is altered.
Definition: OpenDESimpleSetup.cpp:106
A boost shared pointer wrapper for ompl::base::Path.
A boost shared pointer wrapper for ompl::control::OpenDEEnvironment.
double * values
An array of length n, representing the value of the control.
Definition: RealVectorControlSpace.h:87