MorseSimpleSetup.cpp
46 : SimpleSetup(std::make_shared<MorseControlSpace>(std::make_shared<base::MorseStateSpace>(env))), env_(env)
53 ompl::base::ScopedState<ompl::base::MorseStateSpace> ompl::control::MorseSimpleSetup::getCurrentState() const
113 si_->getStatePropagator()->propagate(pc->getState(i), pc->getControl(i), pc->getControlDuration(i), result);
135 ompl::base::PathPtr ompl::control::MorseSimpleSetup::simulateControl(const double *control, unsigned int steps) const
145 ompl::base::PathPtr ompl::control::MorseSimpleSetup::simulateControl(const Control *control, unsigned int steps) const
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:104
This class represents a termination condition for the planner that only terminates if the user shuts ...
Definition: MorseTerminationCondition.h:113
const base::MorseEnvironmentPtr env_
Pointer to the environment representing the MORSE simulation.
Definition: MorseSimpleSetup.h:150
base::ScopedState< base::MorseStateSpace > getCurrentState() const
Get the current MORSE state (read parameters from MORSE bodies)
Definition: MorseSimpleSetup.cpp:53
A shared pointer wrapper for ompl::base::Path.
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
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
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:214
void playSolutionPath() const
Call playPath() on the solution path, if one is available.
Definition: MorseSimpleSetup.cpp:98
void setup() override
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition: MorseSimpleSetup.cpp:70
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:227
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:135
virtual void setup()
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition: SimpleSetup.cpp:54
Create the set of classes typically needed to solve a control problem.
Definition: SimpleSetup.h:126
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:112
virtual base::PlannerStatus solve(double time=1.0)
Run the planner for a specified amount of time (default is 1 second)
Definition: SimpleSetup.cpp:88
std::size_t getStateCount() const
Get the number of states (way-points) that make up this path.
Definition: PathGeometric.h:292
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathControl.h:188
Representation of controls applied in MORSE environments. This is an array of double values.
Definition: MorseControlSpace.h:113
T * as(const unsigned int index) const
Cast a component of this instance to a desired type.
Definition: StateSpace.h:654
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:201
The definition of a control in Rn
Definition: RealVectorControlSpace.h:129
void setCurrentState(const base::ScopedState<> &state)
Set the current MORSE state (set parameters for MORSE bodies)
Definition: MorseSimpleSetup.cpp:65
double * values
An array of length n, representing the value of the control.
Definition: RealVectorControlSpace.h:147
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathGeometric.h:280
base::PlannerStatus solve()
Run the planner until solution is found or user shuts down MORSE.
Definition: MorseSimpleSetup.cpp:91