Quad-SDK
Loading...
Searching...
No Matches
gbpl.h
1#ifndef GBPL_H
2#define GBPL_H
3
4#include "global_body_planner/rrt.h"
5
6#define TRAPPED 0
7#define ADVANCED 1
8#define REACHED 2
9
10using namespace planning_utils;
11
13
18class GBPL : public RRT {
19 public:
24 GBPL();
25
34 int connect(PlannerClass &T, State s, const PlannerConfig &planner_config,
35 int direction, ros::Publisher &tree_pub);
36
44 std::vector<Action> getActionSequenceReverse(PlannerClass &T,
45 std::vector<int> path);
46
54 void postProcessPath(std::vector<State> &state_sequence,
55 std::vector<Action> &action_sequence,
56 const PlannerConfig &planner_config);
57
68 std::vector<State> &state_sequence,
69 std::vector<Action> &action_sequence,
70 const PlannerConfig &planner_config);
71
81 void extractClosestPath(PlannerClass &Ta, const State &s_goal,
82 std::vector<State> &state_sequence,
83 std::vector<Action> &action_sequence,
84 const PlannerConfig &planner_config);
85
96 int findPlan(const PlannerConfig &planner_config, State s_start, State s_goal,
97 std::vector<State> &state_sequence,
98 std::vector<Action> &action_sequence, ros::Publisher &tree_pub);
99
100 protected:
103
106 16.0; // m/s (meters planned/computation time)
107
110
112 const double horizon_expansion_factor = 1.2;
113};
114
115#endif // GBPL_H
A class that implements the Global Body Planner for Legged Robots (GBP-L)
Definition gbpl.h:18
int findPlan(const PlannerConfig &planner_config, State s_start, State s_goal, std::vector< State > &state_sequence, std::vector< Action > &action_sequence, ros::Publisher &tree_pub)
Run the full RRT-Connect planner until the goal is found or time has expired, then post process and u...
Definition gbpl.cpp:159
double anytime_horizon
Time horizon (in seconds) the planner is allowed to search until restarted.
Definition gbpl.h:102
void postProcessPath(std::vector< State > &state_sequence, std::vector< Action > &action_sequence, const PlannerConfig &planner_config)
Post process the path by removing extraneous states that can be bypassed.
Definition gbpl.cpp:44
void extractClosestPath(PlannerClass &Ta, const State &s_goal, std::vector< State > &state_sequence, std::vector< Action > &action_sequence, const PlannerConfig &planner_config)
Post process the path by removing extraneous states that can be bypassed.
Definition gbpl.cpp:149
std::vector< Action > getActionSequenceReverse(PlannerClass &T, std::vector< int > path)
Get the actions along the specified path of vertex indices (assumes that actions are synched with the...
Definition gbpl.cpp:33
GBPL()
Constructor for GBPL.
Definition gbpl.cpp:5
void extractPath(PlannerClass &Ta, PlannerClass &Tb, std::vector< State > &state_sequence, std::vector< Action > &action_sequence, const PlannerConfig &planner_config)
Post process the path by removing extraneous states that can be bypassed.
Definition gbpl.cpp:117
double anytime_horizon_init
Initial anytime horizon (in seconds)
Definition gbpl.h:109
const double horizon_expansion_factor
Factor by which horizon is increased if replanning is required.
Definition gbpl.h:112
int connect(PlannerClass &T, State s, const PlannerConfig &planner_config, int direction, ros::Publisher &tree_pub)
Definition gbpl.cpp:7
const double planning_rate_estimate
Initial guess at how quickly the planner executes (in m/s)
Definition gbpl.h:105
Definition planner_class.h:17
A class that implements RRT sampling-based planning.
Definition rrt.h:19
Planner Configuration.
Definition planning_utils.h:36
Define state with Eigen data.
Definition planning_utils.h:184