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

Issue with the object location coordinate transformation from CARLA to kitti #7

Open
makaveli10 opened this issue May 25, 2022 · 1 comment

Comments

@makaveli10
Copy link

Hi,
I really appreciate the work you have done to put this together. So, I am trying to reproduce this with latest CARLA version and I know the API has changed a bit that's what I am trying to understand.

self.location = " ".join(map(str, [-x, -y, z]))

From what I understood from the docstring section of [this method is that the transformation from CARLA to kitti for the object location should rather be:

self.location = " ".join(map(str, [y, -z, x]))
           Converts the 3D object location from CARLA coordinates and saves them as KITTI coordinates in the object
            In Unreal, the coordinate system of the engine is defined as, which is the same as the lidar points
            z
            ▲   ▲ x
            |  /
            | /
            |/____> y
            This is a left-handed coordinate system, with x being forward, y to the right and z up 
            See also https://github.com/carla-simulator/carla/issues/498
            However, the camera coordinate system for KITTI is defined as
                ▲ z
               /
              /
             /____> x
            |
            |
            |
            ▼
            y 
            This is a right-handed coordinate system with z being forward, x to the right and y down
            Therefore, we have to make the following changes from Carla to Kitti
            Carla: X   Y   Z
            KITTI:-X  -Y   Z 

So, instead of KITTI: -X, -Y, Z it should be Y, -Z, X

@enginBozkurt let me know what you think.

@siddhantkatyan
Copy link

@makaveli10 can you please share the code if you were able to make it run with the latest Carla simulator version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants