Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a question of "rrt_star.py" in rrt_2D. #27

Open
KuKuKI233 opened this issue Mar 7, 2022 · 1 comment
Open

I have a question of "rrt_star.py" in rrt_2D. #27

KuKuKI233 opened this issue Mar 7, 2022 · 1 comment

Comments

@KuKuKI233
Copy link

rrt_star.py :
this part of code

def find_near_neighbor(self, node_new):
        n = len(self.vertex) + 1
        r = min(self.search_radius * math.sqrt((math.log(n) / n)), self.step_len)
        dist_table = [math.hypot(nd.x - node_new.x, nd.y - node_new.y) for nd in self.vertex]
        dist_table_index = [ind for ind in range(len(dist_table)) if dist_table[ind] <= r and
                            not self.utils.is_collision(node_new, self.vertex[ind])]
        return dist_table_index

r is the search radius to search for potential best parent nodes,but I don‘t think it should use min() function. I guess the function of the code about r is that as the vertex increases, the radius of the search for the parent node also increases. But it should use max() function. Maybe there is something I misunderstood, but using max() works better works more in principle..

using min():
屏幕截图 2022-03-07 172100
using max():
屏幕截图 2022-03-07 171957

Is it my understanding of your code is wrong, I hope to get your help.

@zweistein
Copy link

r is calculated correctly. If max works better then you might have chosen a too large step size. Then max always picks the step size as r, otherwise, for a small step size, it is scaled to the tree's cardinality, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants