nutonomy / nuscenes-devkit

The devkit of the nuScenes dataset.
https://www.nuScenes.org
Other
2.19k stars 616 forks source link

coordinate about quaternions of cam #1001

Closed LeningWang closed 6 months ago

LeningWang commented 8 months ago

Camera quaternion based on the vehicle's ego transformation requires knowledge of the direction of the x, y, and z coordinates, i.e., the orientation of the coordinate system. For example, x points towards the front of the vehicle, y points to the left side of the vehicle, and so on. If this description is unclear, can you please provide further explanation?

whyekit-motional commented 8 months ago

@LeningWang you can see the component (x/y/z) direction of each camera here

LeningWang commented 8 months ago

@LeningWang you can see the component (x/y/z) direction of each camera here

But when I use calibrated_sensor.json to get six cams data (involve Translation_X Translation_Y Translation_Z Rotation_W Rotation_X Rotation_Y Rotation_Z), and found these are in one Coordinate system with ego. Can you tell me this Coordinate system? Thanks

whyekit-motional commented 8 months ago

@LeningWang the translation and rotation of each of the 6 cameras are in the ego frame, and the ego itself is in the map frame

LeningWang commented 8 months ago

Yes, I want to know how the ego-vehicle's to Cam coordinate system is defined. Typically, the Z-axis points upwards towards the sky. In this context, does the X-axis point towards the left side or the right side of the vehicle? Similarly, what about the Y-axis? Additionally, is the system based on the left-hand coordinate system or the right-hand coordinate system?

whyekit-motional commented 8 months ago

@LeningWang pls take a look at the link I sent you here: https://github.com/nutonomy/nuscenes-devkit/issues/1001#issuecomment-1784697573

The x-axis is at some angle to the right side of the ego, the y-axis is pointing downwards, and the z-axis is at some angle to the left side of the ego

Similarly, from the link, you can see that all the coordinate systems are right-handed

LeningWang commented 8 months ago

I select a sample in calibrated_sensor.json. One thing is certain that "translation" Z-axis is allow in 1.5m to 1.59m, so, z-axis is pointing upwards

Sample "token": "4ff47c4950f04cb4be1876bc0b028326", "sensor_token": "ce89d4f3050b5892b33b3d328c5e82a3", "translation": [ 0.0283260309358, 0.00345136761476, 1.57910346144 ], "rotation": [ 0.5037872666382278, -0.49740249788611096, -0.4941850223835201, 0.5045496097725578 ], "camera_intrinsic": [ [ 809.2209905677063, 0.0, 829.2196003259838 ], [ 0.0, 809.2209905677063, 481.77842384512485 ], [ 0.0, 0.0, 1.0 ] ] },

@LeningWang pls take a look at the link I sent you here: #1001 (comment)

The x-axis is at some angle to the right side of the ego, the y-axis is pointing downwards, and the z-axis is at some angle to the left side of the ego

Similarly, from the link, you can see that all the coordinate systems are right-handed

whyekit-motional commented 8 months ago

@LeningWang you should be looking at rotation, not translation

LeningWang commented 8 months ago

Of course, the picture provided does not represent the transformation relationship between the Cam and the Ego vehicle. I think we're probably saying all the right things, but we're not talking about the same coordinates. According to our issue I already know the coordinates of the vehicle itself. Thanks image

whyekit-motional commented 8 months ago

@LeningWang so with both rotation and translation, you have complete information about the coordinate frame of each sensor relative to the ego frame