Giter Site home page Giter Site logo

PolygonIterator getting stuck about grid_map HOT 4 OPEN

anybotics avatar anybotics commented on May 17, 2024
PolygonIterator getting stuck

from grid_map.

Comments (4)

pfankhauser avatar pfankhauser commented on May 17, 2024

Hi @KlausBuchegger! I'm sorry you're experiencing problems with Grid Map. Can you help me find and solve this bug? It would be really helpful if you could recreate your scenario in a unit test and if necessary randomize the values and repeat the test until the error occurs?

from grid_map.

KlausBuchegger avatar KlausBuchegger commented on May 17, 2024

Sure, I'll try and do that if I find some time, hopefully early next week.

from grid_map.

KlausBuchegger avatar KlausBuchegger commented on May 17, 2024

So, I tried but failed reproducing my scenario where I got stuck (don't have the exact code anymore).
However, during my experiments I noticed that the GridMap function
getPosition (const Index &index, Position &position)
fails for an Index with negative x or y values.
For example I have a 5x5m map with resolution 0.1 and Position(0,0) as center.
a) Then Index(0,0) ~ Position(2.45,2.45)
b) Index(10,1) ~ Position(1.45,2.35) so far so good
But:
c) Index(-10,1) ~ Position(-1.45,2.45)
d) Index(0,-3) ~ Position(2.3342e-312,0)
I'm not sure what the expected behavior for a negative index should be, my intuition was it would just correspond to a Position outside of the map?
But the y coordinate of c) should definitely be 2.35 to match b) and not 2.45, right?

Anyway this could kind of explain my "getting stuck" behavior, as in those cases the polygon gets really big, and that would take a long time to iterate over every pixel inside.

from grid_map.

KlausBuchegger avatar KlausBuchegger commented on May 17, 2024

Any progress on this issue?

from grid_map.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.