RoboJackets / rrt

C++ RRT (Rapidly-exploring Random Tree) Implementation
Other
253 stars 84 forks source link

Potential Error in Grid Square Location Computation #55

Closed SiyuanQi-zz closed 7 years ago

SiyuanQi-zz commented 7 years ago

In the gridSquareForLocation function of class ObstacleGrid here: original code

Shouldn't the result be the following?

    return Vector2i(loc.x() / discretizedWidth(),
                    loc.y() / discretizedHeight());

As I understand the code, width and height refers to the size of the whole space. discretizedWidth and discretizedHeight refers to the size of the grids. Correct me if I am wrong. Thank you!

SiyuanQi-zz commented 7 years ago

I just realize that discretizedWidth and discretizedHeight refers to the number of the grids. Never mind!

jgkamat commented 7 years ago

Hi! Glad you're taking a look at our codebase! One of the reasons you might be confused is that we have little documentation (and we don't have a docs site for the rrt, as our other projects do). I'm opening a new issue to try to get more docs and a docs site up.

Thanks for taking the time to look at our rrt! :smile: