]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/blobdiff - rrts/src/rrtext2.cc
Merge branch 'fix-steer'
[hubacji1/iamcar2.git] / rrts / src / rrtext2.cc
index 3450735368a0249e26e0cb13b18239b8f45e8731..5dcceae76a15c7a9a6c6fd540ca416d721eb4495 100644 (file)
@@ -37,7 +37,9 @@ RRTExt2::collide_steered()
                i++;
        }
        this->_steered.erase(this->_steered.begin() + i, this->_steered.end());
-       return this->_steered.size() == 0;
+       // The first node of this->_steered is the same as nn. Therefore, if
+       // there is only one node left, it is nn, and other nodes collide.
+       return this->_steered.size() == 1;
 }
 
 RRTExt2::RRTExt2() : RRTS()
@@ -68,12 +70,6 @@ RRTExt2::reset()
        this->c2_bc_.verts[3].y = this->_bc.rfy();
 }
 
-Json::Value
-RRTExt2::json() const
-{
-       return RRTS::json();
-}
-
 void
 RRTExt2::json(Json::Value jvi)
 {