Create an spline to connect RNDF waypoints

Issue #108 resolved
Andrés Fortier created an issue

RNDF uses pairs of exit/entry waypoints to indicate an intersection between lanes (or even in the same lane, in the case of a U-turn). However, there is no geometrical information about how that connection is made, so we are going to try with SP lines. To do that we need a function that given an exit waypoint (w1) with its heading (h1) and an entry waypoint (w2) with its heading (h2), it generates an spline whose initial point is w1 with heading h1 and whose ending point is w2 with heading h2.

Comments (8)

  1. Michel Hidalgo

    @andres_fortier it seems that Hermite interpolation (the one used by ignition_math::Spline) is a procedure that can fit points as well as derivatives at those points. The current codebase automatically computes such tangents in a way that would preserve the lane headings as we want them to.

    After discussing a little bit with @agalbachicar, I'm going to write a test for this and write some basic code that creates two additional points that are collinear with the spline endpoints (like if they were part of the same lane curve) before interpolating. If I'm right, we'll just need to ask for some modifications to ignition_math::Spline API to have access to the interpolating polynomials (most likely, as we'll need derivatives, path integrals, etc. for Maliput RNDF implementation).

    Is that ok?

  2. Andrés Fortier reporter

    Sounds great @hidmic. Maybe you can try with 135 / 90 / 45 / 30 deg corners to see if the results are what we need.

  3. Michel Hidalgo

    Ok, I had to pursue further changes in the API in order to fit it into @agalbachicar spline lane implementation. So far, these include:

    • First derivative forcing at the spline control points.
    • Mth derivative interpolation at an arbitrary point.
    • Arc length parameterization.
    • Arc length computation.

    However, after some discussion with @agalbachicar, these changes aren't sufficient for a complete RNDF Maliput implementation, e.g. derivative evaluation of curves parallel to the baseline. Also, it's not clear whether remaining issues should be addressed at this level or higher. Therefore, we'll deferred them until we actually engage with OSRF.

  4. Andrés Fortier reporter

    @hidmic I wouldn't want to wait until Friday to discuss this. Could you please open a PR against ignition math with your changes, explaining why they are needed and state what is missing to get the discussion started? If, as you think, the extra things should be handled at a higher level, then the PR can be merged and we gain time on that front. If, on the other hand, remaining things should be addressed at that level, we'll get the required feedback / direction from OSRF and can complete the PR. Does that make sense to you? @agalbachicar any opinions on this?

  5. Agustin Alba Chicar

    I agree with you @andres_fortier . Perhaps we can get an intermediate commit in which we can star working to have a preliminary but not totally correct implementation with ignition-math and work out the rest based on OSRF feedback.

  6. Log in to comment