Code Monkey home page Code Monkey logo

Comments (12)

poggenhans avatar poggenhans commented on June 27, 2024 2

I see. Linestrings that have duplicated points are not allowed in general. There are too many algorithms (also in boost::geometry) that rely on this. We should update or docs to reflect that. Linestings that have one single point are allowed however.

from lanelet2.

autonomobil avatar autonomobil commented on June 27, 2024

I think you can workaround this problem by adjusting the border to a very small line:

image

from lanelet2.

amastrobera avatar amastrobera commented on June 27, 2024

yea that's what I have done. I just ask them if it should be an issue or not

from lanelet2.

poggenhans avatar poggenhans commented on June 27, 2024

Hm, that looks like a bug. I'll try to find the time to look into it this week. Thanks for reporting!

from lanelet2.

mitsudome-r avatar mitsudome-r commented on June 27, 2024

This is probably due to miscalculation of the orientation of boundaries.
You cannot calculate signed distance against a point(linestring with length 0).
Since the lane boundary is treated as wrong direction in some cases, lane graph would be corrupted and thus routing fails.

std::pair<LineString1T, LineString2T> align(LineString1T left, LineString2T right) {

from lanelet2.

poggenhans avatar poggenhans commented on June 27, 2024

That shouldn't be the reason. This function checks which of the two linestrings of the lanelet has nonzero length and uses that for the signed distance calculation to the other boundary. There is even a unittest that covers this case. This kind of problem should also be visible in the debug routing graph.

But you are right in that it is most probably related to the problem that it is hard to determine neighborhood relationships for linestrings with zero length. Its not impossible, but hard to get right.

from lanelet2.

mitsudome-r avatar mitsudome-r commented on June 27, 2024

@poggenhans

This function checks which of the two linestrings of the lanelet has nonzero length and uses that for the signed distance calculation to the other boundary.

Are you referring to this line?

  if (!rightOfLeft && left.size() > 1) {
    left = left.invert();
  }

What it is checking is the size of the linestring, not the length.
I believe if the boundary has multiple points with the same location, then this error could still happen.

from lanelet2.

poggenhans avatar poggenhans commented on June 27, 2024

@amastrobera can you confirm that this problem is solved by using a single-point-linestring?

I tried to reproduce your issue and with my test cases everything worked fine with them.

from lanelet2.

amastrobera avatar amastrobera commented on June 27, 2024

@poggenhans yes I tried it just now. LineString3d of 1 point for border makes the path planning work.

from lanelet2.

poggenhans avatar poggenhans commented on June 27, 2024

Ok, thanks for checking. We have updated the doc and added a new validator to lanelet2_validation for this case.

from lanelet2.

autonomobil avatar autonomobil commented on June 27, 2024

How do you generate a "single-node"-way in josm?

from lanelet2.

poggenhans avatar poggenhans commented on June 27, 2024

Afaik, its not possible directly within JOSM. If you remove the second-last node from a way, the way will be deleted as well. But at least JOSM will not remove existing single node ways from loaded OSM files.

To create one, you would have to create it directly within lanelet2 or modify the osm file by hand.

from lanelet2.

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.