carla icon indicating copy to clipboard operation
carla copied to clipboard

Transformation from Camera to World

Open k-nayak opened this issue 2 years ago • 2 comments

Hello all,

I have implemented a lane detection model to detect lanes in carla and it provides a list of xy pixel coodinates. I want to check if it is possible to get the XY map coordinates (in my case town 07) to generate the trajectory along the way for the car to drive. And if it is possible what kind of things are supposed to be taken care of. cam

The green lane is the lane i am working on and if any one can help me out as to how to get the map coordinates of the points, it would be a great help. Thank you in advance for your time and advice.

Carla version: 0.9.11 OS: Windows Code in Python

k-nayak avatar Jun 01 '22 14:06 k-nayak

Hello @Axel1092,

Could you please give me some feedback on if Is it possible to use the following functions to achieve this?

carla.Location and carla.GeoLocation

If I have the location of the car and the points in meter wrt to the camera?

Thanks in advance.

k-nayak avatar Jun 02 '22 08:06 k-nayak

Hello all, i have figured some aspects of my problem so far. Instead of the above mentioned functions i have used rgb_camera.get_transform.get_matrix to get the pose of the camera wrt to world. The camera position and the lane points close to the vehicle have good coordinate values that match the vehicles trajectory location, although as the lane points go farther the coordinate values move away from the trajectory. I am also not sure if the vehicle location z=0.027961 , camera position at a height of 1.5 from the road surface has z= 1.527961, But the lane points after transformation has z values ranging from 1.20 to -3.30. This is somewhat unexpected, could some one explain or give any comment on this? Would mean a lot if someone can clear the doubt.

Thanks

k-nayak avatar Jul 05 '22 10:07 k-nayak

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 02 '23 04:06 stale[bot]