PlannerH.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /// \file PlannerH.h
  2. /// \brief Main functions for path generation (global and local)
  3. /// \author Hatem Darweesh
  4. /// \date Dec 14, 2016
  5. #define START_POINT_MAX_DISTANCE 8 // meters
  6. #define GOAL_POINT_MAX_DISTANCE 8 // meters
  7. #define LANE_CHANGE_SMOOTH_FACTOR_DISTANCE 8 // meters
  8. #include "RoadNetwork.h"
  9. namespace PlannerHNS
  10. {
  11. enum PLANDIRECTION {MOVE_FORWARD_ONLY, MOVE_BACKWARD_ONLY, MOVE_FREE};
  12. enum HeuristicConstrains {EUCLIDEAN, NEIGBORHOOD,DIRECTION };
  13. class PlannerH
  14. {
  15. public:
  16. PlannerH();
  17. virtual ~PlannerH();
  18. void GenerateRunoffTrajectory(const std::vector<std::vector<WayPoint> >& referencePaths, const WayPoint& carPos, const bool& bEnableLaneChange, const double& speed, const double& microPlanDistance,
  19. const double& maxSpeed,const double& minSpeed, const double& carTipMargin, const double& rollInMargin,
  20. const double& rollInSpeedFactor, const double& pathDensity, const double& rollOutDensity,
  21. const int& rollOutNumber, const double& SmoothDataWeight, const double& SmoothWeight,
  22. const double& SmoothTolerance, const double& speedProfileFactor, const bool& bHeadingSmooth,
  23. const int& iCurrGlobalPath, const int& iCurrLocalTraj,
  24. std::vector<std::vector<std::vector<WayPoint> > >& rollOutsPaths,
  25. std::vector<WayPoint>& sampledPoints);
  26. double PlanUsingDP(const WayPoint& carPos,const WayPoint& goalPos,
  27. const double& maxPlanningDistance, const bool bEnableLaneChange, const std::vector<int>& globalPath,
  28. RoadNetwork& map, std::vector<std::vector<WayPoint> >& paths, std::vector<WayPoint*>* all_cell_to_delete = 0);
  29. double PlanUsingDPRandom(const WayPoint& start,
  30. const double& maxPlanningDistance,
  31. RoadNetwork& map,
  32. std::vector<std::vector<WayPoint> >& paths);
  33. double PredictPlanUsingDP(Lane* lane, const WayPoint& carPos, const double& maxPlanningDistance,
  34. std::vector<std::vector<WayPoint> >& paths);
  35. double PredictPlanUsingDP(const WayPoint& startPose, WayPoint* closestWP, const double& maxPlanningDistance, std::vector<std::vector<WayPoint> >& paths, const bool& bFindBranches = true);
  36. double PredictTrajectoriesUsingDP(const WayPoint& startPose, std::vector<WayPoint*> closestWPs, const double& maxPlanningDistance, std::vector<std::vector<WayPoint> >& paths, const bool& bFindBranches = true, const bool bDirectionBased = false, const bool pathDensity = 1.0);
  37. void DeleteWaypoints(std::vector<WayPoint*>& wps);
  38. };
  39. }