Quad-SDK
Loading...
Searching...
No Matches
planner_class.h
1#ifndef PLANNERCLASS_H
2#define PLANNERCLASS_H
3
4#include "global_body_planner/graph_class.h"
5
6using namespace planning_utils;
7
8typedef std::pair<double, int> Distance;
9
12
17class PlannerClass : public GraphClass {
18 public:
25 PlannerClass(int direction, const PlannerConfig &planner_config);
26
33 State randomState(const PlannerConfig &planner_config);
34
42 std::vector<int> neighborhoodN(State s, int N) const;
43
51 std::vector<int> neighborhoodDist(State q, double dist) const;
52
59 int getNearestNeighbor(State q) const;
60
62 int direction_ = FORWARD;
63
65 std::shared_ptr<std::lognormal_distribution<double>> vel_distribution_;
66};
67
68#endif
A general directed graph class.
Definition graph_class.h:24
Definition planner_class.h:17
int getNearestNeighbor(State q) const
Get the closest verticex to the specified state by Euclidean distance.
Definition planner_class.cpp:79
int direction_
Direction.
Definition planner_class.h:62
std::vector< int > neighborhoodN(State s, int N) const
Get the closest N vertices to the specified state by Euclidean distance.
Definition planner_class.cpp:46
std::vector< int > neighborhoodDist(State q, double dist) const
Get the vertices within the specified Euclidean distance of the specified state.
Definition planner_class.cpp:65
State randomState(const PlannerConfig &planner_config)
Generate a random state by sampling from within the bounds of the terrain.
Definition planner_class.cpp:22
std::shared_ptr< std::lognormal_distribution< double > > vel_distribution_
Lognormal distribution for velocity sampling.
Definition planner_class.h:65
Planner Configuration.
Definition planning_utils.h:36
Define state with Eigen data.
Definition planning_utils.h:184