KrisLibrary  1.0.0
CostSpace.h
1 #ifndef PLANNING_COST_SPACE_H
2 #define PLANNING_COST_SPACE_H
3 
4 #include "ControlSpace.h"
5 #include "KinodynamicSpace.h"
6 #include "Objective.h"
7 
13 {
14 public:
15  StateCostControlSpace(const std::shared_ptr<ControlSpace>& base,const std::shared_ptr<ObjectiveFunctionalBase>& objective);
16  virtual std::string VariableName(int i);
17  virtual std::shared_ptr<CSet> GetControlSet(const State& x);
18  virtual std::shared_ptr<SteeringFunction> GetSteeringFunction();
19  virtual InterpolatorPtr Simulate(const State& x0, const ControlInput& u);
20  virtual void Successor(const State& x0, const ControlInput& u,State& x1);
21 
22  static void Split(const State& xc,State& x,Real& cost);
23  static void SplitRef(const State& xc,State& x,Real& cost);
24  static void Join(const State& x,Real cost,State& xc);
25  static Real Cost(const State& xc);
26 
27  std::shared_ptr<ControlSpace> base;
28  std::shared_ptr<ObjectiveFunctionalBase> objective;
29 };
30 
32 {
33 public:
34  StateCostKinodynamicSpace(const std::shared_ptr<KinodynamicSpace>& base,const std::shared_ptr<ObjectiveFunctionalBase>& objective,Real costMax=Inf);
35  virtual EdgePlannerPtr TrajectoryChecker(const ControlInput& u,const std::shared_ptr<Interpolator>& path);
36 
37  void SetCostMax(Real costmax);
38  void SetCostDistanceWeight(Real weight);
39  Real GetCostMax();
40  Real GetCostDistanceWeight();
41 
42  std::shared_ptr<KinodynamicSpace> base;
43  std::shared_ptr<CSpace> scspace;
44  std::shared_ptr<ObjectiveFunctionalBase> objective;
45 };
46 
47 #endif
virtual std::string VariableName(int i)
Returns an identifier for the i&#39;th control variable.
Definition: CostSpace.cpp:14
virtual void Successor(const State &x0, const ControlInput &u, State &x1)
Definition: CostSpace.cpp:78
A control space that adapts a state-space control space to a state-cost space. The new state space is...
Definition: CostSpace.h:12
A class used for kinodynamic planning. Combines a CSpace defining the state space, as well as a ControlSpace.
Definition: KinodynamicSpace.h:22
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&#39;s steering function, if available.
Definition: CostSpace.cpp:63
virtual std::shared_ptr< CSet > GetControlSet(const State &x)
Definition: CostSpace.cpp:19
virtual InterpolatorPtr Simulate(const State &x0, const ControlInput &u)
Definition: CostSpace.cpp:70
Definition: CostSpace.h:31