Closed semirelezovikj closed 3 months ago
@semirelezovikj in general, correct_yaw
is used when coordinate data (i.e (x,y)) is used together with the maps
This is because the maps are essentially images and hence (0, 0) is at the top-left with the positive y-direction extending "downwards", e.g.:
[
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], # -y
[0, 2, 2, 2, 2, 2, 2, 2, 2, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], # +y
],
However, for coordinate data, the positive y-direction would extend "upwards" instead
correct_yaw
's docstring says this function is needed due to the fact that nuScenes maps were flipped over the y-axis. However, either I am missing something or its usage is inconsistently applied throughout the code.This function is used in the
make_representation
method in theStaticLayerRasterizer
class in the following manner:Places where it is not used:
convert_global_coords_to_local
usesangle_of_rotation
directly on the yaw, no correction. callsmake_2d_rotation_matrix
using thatconvert_local_coords_to_global
same, callsmake_2d_rotation_matrix
using the negative of theangle_of_rotation
:As you may imagine, this can cause quite some confusion.