motion-planning / rrt-algorithms

n-dimensional RRT, RRT* (RRT-Star)
MIT License
600 stars 173 forks source link

in the rrt_start.py there two comments confused me #14

Closed liuchong1995 closed 5 years ago

liuchong1995 commented 5 years ago

in the method get_nearby_vertices :return: list of nearby vertices and their costs, sorted in ascending order by cost but it real raturn sorted in ascending order by x_near's first coordinate

in the method current_rewire_count

if no rewire count specified, set rewire count to be all vertices

but the code after it is
if self.rewire_count is not None: return self.trees[tree].V_count does it means if rewire count specified, always set rewire count to be all vertices?

SZanlongo commented 5 years ago

Regarding the first comment, from a cursory glance it seems that the key should be 1, rather than 0. I don't have the time right now to test that. If you think this is correct and can test it, I can merge a PR.

For your second comment, it checks if a rewire count has been previously set. If not, then the rewire count is returned as the current number of vertices.