Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

road objects past road limits aren't generated when using paramPoly3 geometries #80

Open
dpjiitkgp opened this issue Jul 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dpjiitkgp
Copy link

File with_param_poly.xodr:
geometry: ParamPoly3
s_offset for object's outline: exceeds max s_offset of planview geometry
is odrviewer working: NO

File with_line.xodr:
Geometry: Line
s_offset for object's outline: exceeds max s_offset of planview geometry
is odrviewer working: YES

File with_param_poly3_soffset_within_limit.xodr:
Geometry: ParamPoly3
s_offset for object's outline: reduced s_offset so that It can fit within the limit of max s_offset of planview geometry
is odrviewer working: YES

param_poly_issue.zip

@pageldev pageldev added the bug Something isn't working label Sep 16, 2023
@pageldev
Copy link
Owner

This is because the ParamPoly3 geometry doesn't support interpolation past the ends. It's not so easy to fix this due to the way the ParamPoly3 is implemented.

As background: ParamPoly3 uses a CubicBezier under the hood. When the CubicBezier is created it gets sampled from the parametric t=[0.0, 1.0] and a lookup table arc length -> parametric t is created. So basically we can only get t-values for the range [0.0, arc length] and can't get any t-values for past-the-end values (s < 0.0 or s > arc length)

The next step would be extending CubicBezier::get_t to handle values that are not in the valid range. Probably by calculating the arc length for a given t on demand, which is an expensive operation. Alternatively ParamPoly3 could be extended to just linearly extend the ends (like adding Line geometries at the ends)

@pageldev pageldev changed the title odrviewer doesn't work when planview is defined using param_poly3.... road objects past road limits aren't generated when using paramPoly3 geometries Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants