GeoProjection: Fix the handling of left handed Unreal location values - #9590
Merged
Merged
Conversation
Contributor
|
Hey @berndgassmann, thank you for the PR. The implementation is correct, and it fixes the issue with the offset transform. I've left some comments regarding the exposure to the PythonAPI. The code itself works fine but It'd be great if a couple of things were changed. |
Contributor
Author
|
Sure I can change...
did you click on publishing of the comments yet?
:-)
|
glopezdiest
reviewed
Apr 2, 2026
| @@ -359,21 +381,64 @@ void export_geom() { | |||
|
|
|||
| class_<cg::WebMercatorParams>("GeoProjectionWebMerc") | |||
| .def(init<cg::Ellipsoid>((arg("ellps")=cg::Ellipsoid()))) | |||
Contributor
There was a problem hiding this comment.
[Applied to all projections]
There are two inits, one with the offset transfom and one without it. I'd merge them into one.
Contributor
Author
There was a problem hiding this comment.
Now reduced to one single init. Had to refactor the boost optional handling to make the default parameter as well as the read/write access working.
Contributor
|
There, I though I had published them, sorry |
Use a helper class LocationRightHanded to allow the implemenation of the GeoProjections to perform their projections in a right handed coordinate frame. The explicit handling using LocationRightHanded revealed error in OffsetTransform: result Location is now transformed back to Unreal coordinates and Rotation is fixed. Allow OpenDRIVE offsets for any type of projection Fix UniversalTransverseMercatorParams::operator!=()
berndgassmann
force-pushed
the
mai/fix_geo_projection
branch
from
April 13, 2026 12:18
81489dc to
6373f4b
Compare
Blyron
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use a helper class LocationRightHanded to allow the implemenation of the GeoProjections to perform their projections in a right handed coordinate frame.
The explicit handling using LocationRightHanded revealed error in OffsetTransform: result Location is now transformed back to Unreal coordinates and Rotation is fixed.
Allow OpenDRIVE offsets for any type of projection
Fix UniversalTransverseMercatorParams::operator!=()
This fix should contain the fixes which #9552 tried to tackle by using a more general solution. Especially this solution only applies the left-handed/right-handed conversion to the carla::geom::Location values, because all offset values provided by the OpenDRIVE map itself have to be considered to be in right-handed notation.
Description
Fixes #9530
Fixes #9389
And implements #9552 in a more complete manner.
Where has this been tested?
Possible Drawbacks
This change is