MorseSimpleSetup.cpp
46 SimpleSetup(ControlSpacePtr(new MorseControlSpace(base::StateSpacePtr(new base::MorseStateSpace(env))))),
54 ompl::base::ScopedState<ompl::base::MorseStateSpace> ompl::control::MorseSimpleSetup::getCurrentState() const
76 si_->setStateValidityChecker(base::StateValidityCheckerPtr(new base::MorseStateValidityChecker(si_)));
82 space->registerDefaultProjection(base::ProjectionEvaluatorPtr(new base::MorseProjection(space)));
114 si_->getStatePropagator()->propagate(pc->getState(i), pc->getControl(i), pc->getControlDuration(i), result);
136 ompl::base::PathPtr ompl::control::MorseSimpleSetup::simulateControl(const double *control, unsigned int steps) const
139 memcpy(c->as<MorseControlSpace::ControlType>()->values, control, sizeof(double) * getControlSpace()->getDimension());
145 ompl::base::PathPtr ompl::control::MorseSimpleSetup::simulateControl(const Control *control, unsigned int steps) const
State propagation with MORSE. Only forward propagation is possible.
Definition: MorseStatePropagator.h:55
Control * getControl(unsigned int index)
Get the control located at index along the path. This is the control that gets applied to the state l...
Definition: PathControl.h:159
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
double getControlDuration(unsigned int index) const
Get the duration of the control at index, which gets applied to the state at index.
Definition: PathControl.h:171
A boost shared pointer wrapper for ompl::base::StateSpace.
const base::MorseEnvironmentPtr env_
Pointer to the environment representing the MORSE simulation.
Definition: MorseSimpleSetup.h:57
std::size_t getControlCount() const
Get the number of controls applied along this path. This should be equal to getStateCount() - 1 unles...
Definition: PathControl.h:183
bool haveSolutionPath() const
Return true if a solution path is available (previous call to solve() was successful). The solution may be approximate.
Definition: SimpleSetup.h:139
Create the set of classes typically needed to solve a control problem.
Definition: SimpleSetup.h:64
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
MorseSimpleSetup(const base::MorseEnvironmentPtr &env)
The control space is assumed to be MorseControlSpace. The state space is assumed to be MorseStateSpac...
Definition: MorseSimpleSetup.cpp:45
base::PlannerStatus solve()
Run the planner until solution is found or user shuts down MORSE.
Definition: MorseSimpleSetup.cpp:92
This class implements a generic projection for the MorseStateSpace, namely, the subspace representing...
Definition: MorseProjection.h:49
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathGeometric.h:225
void playSolutionPath() const
Call playPath() on the solution path, if one is available.
Definition: MorseSimpleSetup.cpp:99
virtual base::PlannerStatus solve(double time=1.0)
Run the planner for a specified amount of time (default is 1 second)
Definition: SimpleSetup.cpp:92
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
The simplest state validity checker: all states are valid if they are within bounds.
Definition: MorseStateValidityChecker.h:50
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathControl.h:147
base::PathPtr simulateControl(const double *control, unsigned int steps) const
Simulate the MORSE environment forward for steps simulation steps, using the control control...
Definition: MorseSimpleSetup.cpp:136
A boost shared pointer wrapper for ompl::base::StateValidityChecker.
A boost shared pointer wrapper for ompl::control::ControlSpace.
const ControlSpacePtr & getControlSpace() const
Get the current instance of the control space.
Definition: SimpleSetup.h:99
base::ScopedState< base::MorseStateSpace > getCurrentState() const
Get the current MORSE state (read parameters from MORSE bodies)
Definition: MorseSimpleSetup.cpp:54
A boost shared pointer wrapper for ompl::base::ProjectionEvaluator.
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:48
void playPath(const base::PathPtr &path) const
Set the MORSE world to the states that are contained in a given path, sequentially.
Definition: MorseSimpleSetup.cpp:105
The definition of a control in Rn
Definition: RealVectorControlSpace.h:68
void setup()
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition: MorseSimpleSetup.cpp:71
const base::MorseEnvironmentPtr & getEnvironment() const
Get the MORSE environment associated with this setup.
Definition: MorseSimpleSetup.h:70
const base::StateSpacePtr & getStateSpace() const
Get the current instance of the state space.
Definition: SimpleSetup.h:93
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
base::PathPtr simulate(unsigned int steps) const
Simulate the MORSE environment forward for steps simulation steps, using the null control (ompl::cont...
Definition: MorseSimpleSetup.cpp:162
Representation of controls applied in MORSE environments. This is an array of double values...
Definition: MorseControlSpace.h:51
A boost shared pointer wrapper for ompl::base::MorseEnvironment.
A boost shared pointer wrapper for ompl::base::Path.
void setCurrentState(const base::ScopedState<> &state)
Set the current MORSE state (set parameters for MORSE bodies)
Definition: MorseSimpleSetup.cpp:66
This class represents a termination condition for the planner that only terminates if the user shuts ...
Definition: MorseTerminationCondition.h:50
double * values
An array of length n, representing the value of the control.
Definition: RealVectorControlSpace.h:87