]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/blobdiff - incl/rrts.hh
Add eta getter/setter
[hubacji1/rrts.git] / incl / rrts.hh
index 603c0a8cc58a7168a8479fc14b04387977226619..0b8e363cb3e22e322577cd70e34ef4148a92ab22 100644 (file)
@@ -73,6 +73,7 @@ protected:
        BicycleCar bc_;
        RRTGoal goal_;
        unsigned int icnt_ = 0;
+       unsigned int _imax = 1000;
        Ter ter_;
        std::default_random_engine gen_;
        std::vector<RRTNode> nodes_;
@@ -107,6 +108,24 @@ protected:
 public:
        RRTS();
 
+       /*! Set internal bicycle car. */
+       BicycleCar &bc();
+
+       /*! Set maximum number of iterations before reset. */
+       void set_imax_reset(unsigned int i);
+
+       /*! Set goal. */
+       void set_goal(double x, double y, double b, double e);
+
+       /*! Set start. */
+       void set_start(double x, double y, double h);
+
+       /*! Get path. */
+       std::vector<Pose> get_path() const;
+
+       /*! Get path cost. */
+       double get_path_cost() const;
+
        /*! Get iterations counter. */
        unsigned int icnt() const;
 
@@ -116,6 +135,9 @@ public:
        /*! Return elapsed time. */
        double scnt() const;
 
+       double eta() const;
+       void eta(double e);
+
        /*! Generate JSON output. */
        Json::Value json() const;