6#include "global_body_planner/planner_class.h"
12using namespace planning_utils;
70 ros::Publisher &tree_pub);
97 void getStatistics(
double &plan_time,
int &vertices_generated,
98 double &plan_length,
double &path_duration,
99 double &dist_to_goal);
114 ros::Publisher &tree_pub);
144 std::chrono::duration<double> elapsed_to_first_;
Definition planner_class.h:17
A class that implements RRT sampling-based planning.
Definition rrt.h:19
RRT()
Constructor for RRT.
Definition rrt.cpp:5
int attemptConnect(const State &s_existing, const State &s, double t_s, StateActionResult &result, const PlannerConfig &planner_config, int direction)
Definition rrt.cpp:93
double path_length_
Path quality in meters.
Definition rrt.h:153
std::vector< int > pathFromStart(PlannerClass &T, int idx)
Get the path from the root vertex to the specified one.
Definition rrt.cpp:183
double path_duration_
The duration of the path in seconds.
Definition rrt.h:156
double dist_to_goal_
Distance from the final state to the goal (m)
Definition rrt.h:159
visualization_msgs::MarkerArray tree_viz_msg_
Message for tree visualization.
Definition rrt.h:162
const double prob_goal_thresh
Probability with which the goal is sampled (if running vanilla RRT)
Definition rrt.h:135
bool goal_found
Boolean for if the goal has been reached.
Definition rrt.h:138
int success_
Integer checking if a solution was computed in 5 seconds.
Definition rrt.h:147
std::vector< Action > getActionSequence(PlannerClass &T, std::vector< int > path)
Get the actions along the specified path of vertex indices (assumes that actions are synched with the...
Definition rrt.cpp:204
std::chrono::duration< double > elapsed_total_
Total time elapsed in this planner call.
Definition rrt.h:141
std::vector< State > getStateSequence(PlannerClass &T, std::vector< int > path)
Get the states along the specified path of vertex indices.
Definition rrt.cpp:195
bool newConfig(State s, State s_near, StateActionResult &result, const PlannerConfig &planner_config, int direction, ros::Publisher &tree_pub)
Generate a new state that can be connected to the tree and is as close as possible to the specified s...
Definition rrt.cpp:11
void printPath(PlannerClass &T, std::vector< int > path)
Print the states in the specified path via stdout.
Definition rrt.cpp:214
~RRT()
Destructor for RRT.
Definition rrt.cpp:7
void getStatistics(double &plan_time, int &vertices_generated, double &plan_length, double &path_duration, double &dist_to_goal)
Get the statistics for the planner solve.
Definition rrt.cpp:225
int num_vertices_
Number of vertices in the tree.
Definition rrt.h:150
virtual int extend(PlannerClass &T, const State &s, const PlannerConfig &planner_config, int direction, ros::Publisher &tree_pub)
Definition rrt.cpp:164
Planner Configuration.
Definition planning_utils.h:36
Definition planning_utils.h:228
Define state with Eigen data.
Definition planning_utils.h:184