13 #ifndef OMPLAPP_KINEMATIC_CAR_PLANNING_
14 #define OMPLAPP_KINEMATIC_CAR_PLANNING_
16 #include "omplapp/apps/AppBase.h"
17 #include <ompl/base/spaces/SE2StateSpace.h>
18 #include <ompl/control/ODESolver.h>
19 #include <ompl/control/spaces/RealVectorControlSpace.h>
39 class KinematicCarPlanning :
public AppBase<AppType::CONTROL>
42 KinematicCarPlanning();
43 KinematicCarPlanning(
const control::ControlSpacePtr &controlSpace);
44 ~KinematicCarPlanning()
override =
default;
46 bool isSelfCollisionEnabled()
const override
50 unsigned int getRobotCount()
const override
54 base::ScopedState<> getDefaultStartState()
const override;
59 const base::StateSpacePtr& getGeometricComponentStateSpace()
const override
63 double getVehicleLength()
67 void setVehicleLength(
double length)
69 lengthInv_ = 1./length;
71 virtual void setDefaultControlBounds();
75 const base::State* getGeometricComponentStateInternal(
const base::State* state,
unsigned int )
const override
82 virtual void postPropagate(
const base::State* state,
const control::Control* control,
double duration, base::State* result);
84 static control::ControlSpacePtr constructControlSpace()
86 return std::make_shared<control::RealVectorControlSpace>(constructStateSpace(), 2);
88 static base::StateSpacePtr constructStateSpace()
90 return std::make_shared<base::SE2StateSpace>();
93 double timeStep_{1e-2};
94 double lengthInv_{1.};
95 control::ODESolverPtr odeSolver;