open-simulation-interface icon indicating copy to clipboard operation
open-simulation-interface copied to clipboard

Adapt ReferenceLine ST definition to avoid transformation ambiguity and discontinuities

Open ReinhardBiegelIntech opened this issue 2 years ago • 5 comments

This addresses #645

Current definition of s,t coordinates has some (well documented) downsides, which we would like to mitigate with this proposed change. With the updated s,t definition, x,y <-> s,t associations are unique inside the lane geometries and there are no gaps in the s coordinate anymore.

This approach is used and tested by openPASS .

Checks will follow (but the links to howtocontribute.html seem to be dead... where to get this information?)

  • [ ] My suggestion follows the style and contributors guidelines.
  • [x] I have taken care about the documentation.
  • [x] I have done the DCO signoff.
  • [x] My changes generate no errors when passing CI tests.
  • [x] I have successfully implemented and tested my fix/feature locally.
  • [ ] Appropriate reviewer(s) are assigned.

ReinhardBiegelIntech avatar Jul 08 '22 07:07 ReinhardBiegelIntech

@tbleher @ThomasNaderBMW @jdsika Here is our proposal regarding the discussed issue with computation of s-t-coordinates.

ArunDas1 avatar Jul 08 '22 10:07 ArunDas1

Change looks good to me.

tbleher avatar Sep 16 '22 12:09 tbleher

As discussed in the ASAM OSI Other Models Workgroup meeting on Monday, we updated the PR to clarify the constraints on the T axis.

ReinhardBiegelIntech avatar Sep 30 '22 14:09 ReinhardBiegelIntech

After reading the documentation and having a look at the provided diagrams i have a question: Consider a reference line that only has two points (straight line). How would you calculate the (s,t) coordinates for a point that lies on a line perpendicular to the last point of the segment. As far as i can, using the proposed definition of the t axis their is no way to define a t-axis that crosses the point and still maps it to a valid s-coordinate (a value of s smaller than the maximal value specified by the last point on the reference line). In large, this question also applies to the last segment of a specified reference line. Could you maybe elaborate on this?

lemmer-fzi avatar Oct 13 '22 07:10 lemmer-fzi

After reading the documentation and having a look at the provided diagrams i have a question: Consider a reference line that only has two points (straight line). How would you calculate the (s,t) coordinates for a point that lies on a line perpendicular to the last point of the segment. As far as i can, using the proposed definition of the t axis their is no way to define a t-axis that crosses the point and still maps it to a valid s-coordinate (a value of s smaller than the maximal value specified by the last point on the reference line). In large, this question also applies to the last segment of a specified reference line. Could you maybe elaborate on this?

You can always define the t-axis to be the line perpendincular to the segment. In this case your point, which is perpendicular to the last point lies exactly on this t-axis and therefore has the same s coordinate (the t-axis consists of all points with equal s coordinate). Furthermore all s coordinates are valid (even negative values).

weissdavid avatar Oct 13 '22 14:10 weissdavid

@ThomasNaderBMW We updated the PR as discussed last week (addition of a reference line type enum).

ReinhardBiegelIntech avatar Oct 19 '22 08:10 ReinhardBiegelIntech

OSI_s-t_calculation.pdf As discussed in the CCB meeting, we prepared an exemplary calculation.

weissdavid avatar Nov 07 '22 10:11 weissdavid

From WG Harmonization: Please add a hint at the beginning, that the ST coordinate definition should not be misunderstood as the ST definition in OpenDRIVE and OpenSCENARIO 1.x.

The current proto definition for the enum fields "other" and "unknown" are missing, so it does not follow the coding convention guidelines: https://opensimulationinterface.github.io/osi-documentation/#_contributing_changes To be determined by CCB if this is an exceptional situation and can be accepted.

thempen avatar Nov 09 '22 08:11 thempen

@thempen Added a note as discussed. Should this be tagged as ReadyForCCBReview again?

ReinhardBiegelIntech avatar Nov 09 '22 09:11 ReinhardBiegelIntech

OSI CCB 2022-11-21: Can be merged as is with necessary changes to resolve technical conflicts. Merge and cleanup done by @pmai.

pmai avatar Nov 21 '22 10:11 pmai