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

Geolocation to world coordinates #1848

Open
muety opened this issue Jul 4, 2019 · 11 comments
Open

Geolocation to world coordinates #1848

muety opened this issue Jul 4, 2019 · 11 comments

Comments

@muety
Copy link
Contributor

muety commented Jul 4, 2019

While the Python API offers carla.Map.transform_to_geolocation(), I couldn't find a method to do a conversion the other way round. How can I achieve that?

@nsubiron
Copy link
Collaborator

nsubiron commented Jul 5, 2019

Sadly that's not implemented.

@muety
Copy link
Contributor Author

muety commented Jul 5, 2019

I'd appreciate if someone could implement that! I guess is not too big of a change and would help me a lot!

@germanros1987
Copy link
Member

@Axel1092 0.9.11 task?

@jht1759
Copy link

jht1759 commented Aug 19, 2020

Hello Gentle:
@germanros1987

I'd like to know. before the official version 0.9.11 release for this issue. how can we do some script for it by ourself. and then we can solve the issue temporary.

Thanks a lot!

@jht1759
Copy link

jht1759 commented Aug 19, 2020

@muety : Do you have any idea to solve the issue you request? Thanks a lot!

@muety
Copy link
Contributor Author

muety commented Aug 19, 2020

@jht1759 There has to be some kind of linear mapping from world coordinates to GNSS coordinates, i.e. vectors A and B, such that P_world = P_gnss * A + B. However, I don't know how to find those factors in Carla's code base. To be honest, to approximately solve my problem, I sampled a few thousand (P_world, P_gnss) pairs and then did a regression to find out their relationship (i.e A and B), but that's not recommendable as it's not exact and a very ugly hack.

@Axel1092
Copy link
Contributor

Hi all, we will implement this feature for 0.9.11. In the mean time, you could search on how to perform the projections from geolocation coordinates to the plane X,Y for instance using the mercator projection. There is also the proj library (https://proj.org/) which has a number of projections from geolocation.

@rhklite
Copy link

rhklite commented Dec 11, 2020

I'm having trouble with this aswell. I tried using the python utm package: utm.from_latlon(), but the result does not match up with the map imported from OSM. Can anyone provide some information on how the (0,0) position in carla is selected when the .xodr file is imported?

@werewolfdev
Copy link

Hi @Axel1092 geolocation to ENU is still not implemented right in CARLA

@k-nayak
Copy link

k-nayak commented Jun 1, 2022

Hello, all I have been digging the forum for a while and I feel like this discussion has been the closest till now. I would like to get the XY map coordinates of a map (Town07 in my case) by using pixel coordinates from the camera. I am using a lane detection model and want to generate a trajectory by getting the XY coordinates of the map using the detected pixel locations on the road. And I want to know if anyone can guide me in the right direction of how that can be achieved or if it is still a work in progress. I am using Carla 0.9.11. Any feedback would be of great help. Thanks a lot.

@Sultan91
Copy link

@Axel1092 Hi, was this feature already implemented?

@Axel1092 Axel1092 removed their assignment Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment