]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/commitdiff
Add sample distribution type variable
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 3 Feb 2020 15:03:08 +0000 (16:03 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 3 Feb 2020 15:03:08 +0000 (16:03 +0100)
api/rrts.h

index 313b905623c80acb4fc3c006e8b75d80fc890c2f..fbd3d3428c52b6e214db9f9232c41afa22969e3e 100644 (file)
@@ -75,6 +75,8 @@ class Obstacle {
 \param goals The vector of goal nodes.
 \param nodes The vector of all nodes in RRT data structure.
 \param samples The vector of all samples of RRT algorithm.
+\param sample_dist_type Random distribution type for sampling function (0 -
+normal, 1 - uniform)
 */
 class RRTS {
         private:
@@ -83,6 +85,7 @@ class RRTS {
                 double scnt_ = 0;
                 double pcnt_ = 0;
                 bool gf_ = false;
+                int sample_dist_type_ = 0;
 
                 std::vector<RRTNode> goals_;
                 std::vector<RRTNode> nodes_;
@@ -191,6 +194,8 @@ class RRTS {
                 double scnt() const { return this->scnt_; }
                 bool gf() const { return this->gf_; }
                 void gf(bool f) { this->gf_ = f; }
+                int sample_dist_type() const { return this->sample_dist_type_;}
+                void sample_dist_type(int t) { this->sample_dist_type_ = t; }
                 std::vector<RRTNode> &goals() { return this->goals_; }
                 std::vector<RRTNode> &nodes() { return this->nodes_; }
                 std::vector<Obstacle> &obstacles() { return this->obstacles_; }