LearningByCheating icon indicating copy to clipboard operation
LearningByCheating copied to clipboard

Questions about the coordinate system in the birdview_lmdb

Open monghimng opened this issue 3 years ago • 0 comments

Hi,

Thank you for the amazing code. We have some confusion about some of the numbers in the bird's eye view. If we understand the code correctly, the bev is collected 100 pixels (set up by PIXELS_AHEAD_VEHICLE in map_utils.py. Since 5 pixels per meter, this is 20 meters) ahead of the egovehicle's location, along the vehicle's forward direction.

Therefore, when retrieving the bev in birdview_lmdb, ignoring data augmentation, the row dimension of the birdview maps are cropped at [260 - 192, 260]. 260 comes from 160 (half of the birdview size) plus that 100 PIXELS_AHEAD_VEHICLE. In addition, the crop is also moved by PIXEL_OFFSET=10 forward. From line,

dy = np.random.randint(0,self.crop_y_jitter+1) - PIXEL_OFFSET

We guess this represents the camera location, which is 2 meters (therefore 10 pixels) ahead of the egovehicle's location. Thus we conjecture the bottom of the 192 actual input to the teacher model is the camera location, not the egovehicle's location.

Looking at the waypoint generation code, we think these waypoints lives in the coord system where the egovehicle's location is at the bottom of the input 192 bev maps.

We are confused by the mismatch of the bev's bottom location. In bev cropping, it seems to be the camera location. In waypoint generation, it is the vehicle's location. Is this intentional? Which one is right? It is also possible we miss something.

Thanks.

monghimng avatar Sep 12 '20 05:09 monghimng