ODESolver.h
87 typedef boost::function<void(const base::State *state, const Control *control, const double duration, base::State *result)> PostPropagationEvent;
91 ODESolver (const SpaceInformationPtr& si, const ODE& ode, double intStep) : si_(si), ode_(ode), intStep_(intStep)
135 ODESolverStatePropagator (ODESolverPtr solver, const PostPropagationEvent &pe) : StatePropagator (solver->si_), solver_(solver), postEvent_(pe)
141 virtual void propagate (const base::State *state, const Control *control, const double duration, base::State *result) const
156 return StatePropagatorPtr(dynamic_cast<StatePropagator*>(new ODESolverStatePropagator(solver, postEvent)));
179 // boost::numeric::odeint will callback to this method during integration to evaluate the system
204 ODEBasicSolver (const SpaceInformationPtr &si, const ODESolver::ODE &ode, double intStep = 1e-2) : ODESolver(si, ode, intStep)
231 ODEErrorSolver (const SpaceInformationPtr &si, const ODESolver::ODE &ode, double intStep = 1e-2) : ODESolver(si, ode, intStep)
277 ODEAdaptiveSolver (const SpaceInformationPtr &si, const ODESolver::ODE &ode, double intStep = 1e-2) : ODESolver(si, ode, intStep), maxError_(1e-6), maxEpsilonError_(1e-7)
316 odeint::controlled_runge_kutta< Solver > solver (odeint::default_error_checker<double>(maxError_, maxEpsilonError_));
318 typename boost::numeric::odeint::result_of::make_controlled< Solver >::type solver = make_controlled( 1.0e-6 , 1.0e-6 , Solver() );
Solver for ordinary differential equations of the type q' = f(q, u), where q is the current state of ...
Definition: ODESolver.h:226
ODEErrorSolver(const SpaceInformationPtr &si, const ODESolver::ODE &ode, double intStep=1e-2)
Parameterized constructor. Takes a reference to the SpaceInformation, an ODE to solve, and the integration step size - default is 0.01.
Definition: ODESolver.h:231
double getMaximumEpsilonError() const
Retrieve the error tolerance during one step of numerical integration (local truncation error) ...
Definition: ODESolver.h:294
static StatePropagatorPtr getStatePropagator(ODESolverPtr solver, const PostPropagationEvent &postEvent=NULL)
Retrieve a StatePropagator object that solves a system of ordinary differential equations defined by ...
Definition: ODESolver.h:129
double getIntegrationStepSize() const
Return the size of a single numerical integration step.
Definition: ODESolver.h:107
ODEAdaptiveSolver(const SpaceInformationPtr &si, const ODESolver::ODE &ode, double intStep=1e-2)
Parameterized constructor. Takes a reference to the SpaceInformation, an ODE to solve, and an optional integration step size - default is 0.01.
Definition: ODESolver.h:277
const SpaceInformationPtr & getSpaceInformation() const
Get the current instance of the space information.
Definition: ODESolver.h:119
boost::function< void(const StateType &, const Control *, StateType &)> ODE
Callback function that defines the ODE. Accepts the current state, input control, and output state...
Definition: ODESolver.h:83
ODESolver::StateType getError()
Retrieves the error values from the most recent integration.
Definition: ODESolver.h:236
A boost shared pointer wrapper for ompl::control::ODESolver.
Model the effect of controls on system states.
Definition: StatePropagator.h:62
virtual void solve(StateType &state, const Control *control, const double duration) const =0
Solve the ODE given the initial state, and a control to apply for some duration.
void setMaximumError(double error)
Set the total error allowed during numerical integration.
Definition: ODESolver.h:288
virtual void solve(StateType &state, const Control *control, const double duration) const
Solve the ODE using boost::numeric::odeint. Save the resulting error values into error_.
Definition: ODESolver.h:243
Adaptive step size solver for ordinary differential equations of the type q' = f(q, u), where q is the current state of the system and u is a control applied to the system. The maximum integration error is bounded in this approach. Solver is the numerical integration method used to solve the equations, and must implement the error stepper concept from boost::numeric::odeint. The default is a fifth order Runge-Kutta Cash-Karp method with a fourth order error bound.
Definition: ODESolver.h:272
const SpaceInformationPtr si_
The SpaceInformation that this ODESolver operates in.
Definition: ODESolver.h:165
virtual void solve(StateType &state, const Control *control, const double duration) const
Solve the ODE using boost::numeric::odeint.
Definition: ODESolver.h:211
void setIntegrationStepSize(double intStep)
Set the size of a single numerical integration step.
Definition: ODESolver.h:113
A boost shared pointer wrapper for ompl::control::SpaceInformation.
ODESolver::StateType error_
The error values calculated during numerical integration.
Definition: ODESolver.h:262
boost::function< void(const base::State *state, const Control *control, const double duration, base::State *result)> PostPropagationEvent
Callback function to perform an event at the end of numerical integration. This functionality is opti...
Definition: ODESolver.h:87
Basic solver for ordinary differential equations of the type q' = f(q, u), where q is the current sta...
Definition: ODESolver.h:198
void setMaximumEpsilonError(double error)
Set the error tolerance during one step of numerical integration (local truncation error) ...
Definition: ODESolver.h:300
double maxError_
The maximum error allowed when performing numerical integration.
Definition: ODESolver.h:324
Abstract base class for an object that can solve ordinary differential equations (ODE) of the type q'...
Definition: ODESolver.h:75
ODEBasicSolver(const SpaceInformationPtr &si, const ODESolver::ODE &ode, double intStep=1e-2)
Parameterized constructor. Takes a reference to the SpaceInformation, an ODE to solve, and an optional integration step size - default is 0.01.
Definition: ODESolver.h:204
double getMaximumError() const
Retrieve the total error allowed during numerical integration.
Definition: ODESolver.h:282
ODESolver(const SpaceInformationPtr &si, const ODE &ode, double intStep)
Parameterized constructor. Takes a reference to SpaceInformation, an ODE to solve, and the integration step size.
Definition: ODESolver.h:91
virtual void solve(StateType &state, const Control *control, const double duration) const
Solve the ordinary differential equation given the input state of the system, a control to apply to t...
Definition: ODESolver.h:311
double intStep_
The size of the numerical integration step. Should be small to minimize error.
Definition: ODESolver.h:171
double maxEpsilonError_
The maximum error allowed during one step of numerical integration.
Definition: ODESolver.h:327