1 #ifndef PLANNING_CONTROL_SPACE_H 2 #define PLANNING_CONTROL_SPACE_H 5 #include "Interpolator.h" 6 #include "CSpaceHelpers.h" 34 virtual std::string VariableName(
int i);
50 InterpolatorPtr p = Simulate(x0,u);
91 std::shared_ptr<ControlSpace> reverseControlSpace;
103 virtual bool IsExact()
const {
return true; };
104 virtual bool IsOptimal()
const {
return true; };
136 enum TimeSelection { Uniform, Maximum, Biased };
139 virtual int NumDimensions()
const;
140 virtual bool Project(
Config& x);
141 virtual bool IsSampleable()
const;
145 TimeSelection timeSelection;
146 std::shared_ptr<CSet> base;
171 enum Integrator {
Euler, RK4 };
174 IntegratedControlSpace(DynamicsFn f,
const std::shared_ptr<CSet>& fControlSet,Real dt=0.01,Real dtmax=0.1);
176 void SetBaseControlSet(std::shared_ptr<CSet> baseControlSet);
177 std::shared_ptr<CSet> GetBaseControlSet();
178 virtual std::string VariableName(
int i);
180 virtual std::shared_ptr<CSet> GetControlSet(
const Config& x);
190 DynamicsFn myDynamics;
193 std::shared_ptr<CSet> controlSet;
213 virtual std::string VariableName(
int i);
214 virtual std::shared_ptr<CSet> GetControlSet(
const Config& x);
222 std::shared_ptr<CSpace> base;
223 Real maxNeighborhoodRadius;
A space with geodesics and (optionally) geodesic derivatives.
Definition: GeodesicSpace.h:31
Real Sample(const Interval &s)
Uniformly samples the given intervals.
Definition: sample.cpp:116
virtual void UpdateIntegrationParameters(const State &x)
Update controlSpace, dt, or dtmax if state-dependent.
Definition: ControlSpace.h:188
virtual bool ReverseControl(const State &x0, const State &x1, ControlInput &u)
Definition: ControlSpace.h:89
Definition: ControlSpace.h:84
Vector Config
an alias for Vector
Definition: RobotKinematics3D.h:14
A function from R^n to R^m.
Definition: function.h:134
std::shared_ptr< SteeringFunction > mySteeringFunction
Dynamically overridable default steering function.
Definition: ControlSpace.h:75
Stores a kinodynamic path with piecewise constant controls.
Definition: KinodynamicPath.h:23
A cartesian-product control space in which groups of states are controlled by individual control spac...
Definition: ControlSpace.h:133
virtual void SampleControl(const State &x, ControlInput &u)
Definition: ControlSpace.h:64
Real dt
integration time step
Definition: ControlSpace.h:194
virtual void Successor(const State &x0, const ControlInput &u, State &x1)
Definition: ControlSpace.h:49
Encodes the dynamics of a system, including the dynamics function f(x,u), control bounds...
Definition: ControlSpace.h:27
virtual std::shared_ptr< SteeringFunction > GetSteeringFunction()
Returns this space's steering function, if available.
Definition: ControlSpace.h:41
Adapts a kinematic cspace (given to the constructor) to a control space.
Definition: ControlSpace.h:207
std::shared_ptr< CSet > myControlSet
Dynamically overridable default control set (Note: state independent)
Definition: ControlSpace.h:73
void Euler(DiffEqFunction *f, Real a, Real b, const Vector &alpha, int n, Vector &wn)
Solve an ODE system using Euler's method.
Definition: diffeq.cpp:247
Contains all definitions in the Math package.
Definition: WorkspaceBound.h:12
A subset of a CSpace, which establishes a constraint for a configuration to be feasible.
Definition: CSet.h:20
virtual std::shared_ptr< CSet > GetControlSet(const State &x)
Definition: ControlSpace.h:38
A function in a ControlSpace that attempts to connect two states with a sequence of one or more contr...
Definition: ControlSpace.h:98
virtual bool IsValidControl(const State &x, const ControlInput &u)
Definition: ControlSpace.h:70
virtual Math::VectorFieldFunction * SuccessorNumeric()
Definition: ControlSpace.h:56
Real dtmax
maximum dt chosen in controls
Definition: ControlSpace.h:195
Base class for adapting a simulation function by integrating forward dynamics into a ControlSpace...
Definition: ControlSpace.h:166