#include <chrono>
#include <functional>
-#include <jsoncpp/json/json.h>
+#include <json/json.h>
#include <random>
#include <vector>
#include "bcar.h"
std::vector<Obstacle> obstacles_;
std::vector<RRTNode> samples_;
std::vector<RRTNode> steered_;
+ std::vector<RRTNode *> path_;
double log_path_time_ = 0.1;
unsigned int log_path_iter_ = 20;
/*! \brief Initialize RRT algorithm if needed.
*/
virtual void init();
+ virtual void reset();
/*! \brief Deinitialize RRT algorithm if needed.
*/
virtual void deinit();
/*! \brief Return path found by RRT*.
*/
- virtual std::vector<RRTNode *> path();
+ virtual std::vector<RRTNode *>& path()
+ {
+ return this->path_;
+ }
+ virtual void compute_path();
/*! \brief Return ``true`` if algorithm should stop.
Update counters (iteration, seconds, ...) and return if