nutonomy / nuscenes-devkit

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

Arbitrariness of wlh with respect to xyz ? #970

Closed polo5 closed 10 months ago

polo5 commented 10 months ago

Hi,

Thanks for all the hard work. I'm confused about the conventions you use when it comes to width,length,height of bboxes. In this issue it seems to be claimed that the x,y,z directions of some sensor and the wlh values of some bbox in that sensor's coordinate system are not related. But then what is the meaning of width, length and height ?

Furthermore, in the corners() method of the Box data class (here) it seems to be casually assumed that width,length,height run along y,x,z respectively (looks like the ego frame). Wouldn't this assume that if the ego vehicle turns by 90 degrees, the width and length of the bbox will be swapped?

Thanks for your clarification!

polo5 commented 10 months ago

These questions came up because I have 8 corners from an axis aligned bbox I drew in the lidar pointcloud/coordinate system, and I would like to express it in the global [xc,yc,zc,w,l,h,yaw] representation that nuscenes uses.

whyekit-motional commented 10 months ago

@polo5 the xyz of a box center (as given in the raw annotations) is wrt the global frame, while the wlh of the box is independent of the coordinate frame

polo5 commented 10 months ago

Thanks @whyekit-motional. As I said I'm aware of this already though. I was hoping for some extra clarification.

When annotating bboxes some choice was made about the meaning of width,length,height and I'm asking for that very design choice. Is it based on each class geometry, e.g. length runs from the back of the car to the front of the car? Again, the reason I thought this design choice could be related to some coordinate system is the code for corners here which explicitly assumes some fixed relationship for x,y,z and w,l,h.

whyekit-motional commented 10 months ago

@polo5 yes, length runs along the longitudinal axis of the ego, while width runs along the latitudinal axis of the ego