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:103
This class represents a termination condition for the planner that only terminates if the user shuts ...
Definition: MorseTerminationCondition.h:110
const base::MorseEnvironmentPtr env_
Pointer to the environment representing the MORSE simulation.
Definition: MorseSimpleSetup.h:146
base::ScopedState< base::MorseStateSpace > getCurrentState() const
Get the current MORSE state (read parameters from MORSE bodies)
Definition: MorseSimpleSetup.cpp:52
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:161
MorseSimpleSetup(const base::MorseEnvironmentPtr &env)
The control space is assumed to be MorseControlSpace. The state space is assumed to be MorseStateSpac...
Definition: MorseSimpleSetup.cpp:44
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:212
void playSolutionPath() const
Call playPath() on the solution path, if one is available.
Definition: MorseSimpleSetup.cpp:97
void setup() override
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition: MorseSimpleSetup.cpp:69
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:225
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:134
virtual void setup()
This method will create the necessary classes for planning. The solve() method will call this functio...
Definition: SimpleSetup.cpp:58
Create the set of classes typically needed to solve a control problem.
Definition: SimpleSetup.h:124
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:109
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:280
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathControl.h:186
Representation of controls applied in MORSE environments. This is an array of double values.
Definition: MorseControlSpace.h:110
T * as(const unsigned int index) const
Cast a component of this instance to a desired type.
Definition: StateSpace.h:651
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:199
The definition of a control in Rn
Definition: RealVectorControlSpace.h:126
void setCurrentState(const base::ScopedState<> &state)
Set the current MORSE state (set parameters for MORSE bodies)
Definition: MorseSimpleSetup.cpp:64
double * values
An array of length n, representing the value of the control.
Definition: RealVectorControlSpace.h:144
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathGeometric.h:268
base::PlannerStatus solve()
Run the planner until solution is found or user shuts down MORSE.
Definition: MorseSimpleSetup.cpp:90