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

how to get the alpha using the heading #11

Open
sunjieee opened this issue Jun 6, 2020 · 1 comment
Open

how to get the alpha using the heading #11

sunjieee opened this issue Jun 6, 2020 · 1 comment

Comments

@sunjieee
Copy link

sunjieee commented Jun 6, 2020

hello, I have a question about the way to get the alpha using the heading
in your examples, the groundtruth_extraction.py file, the code is
126 pos = (label.box.center_x,label.box.center_y,label.box.center_z,1)
127 pos = np.matmul(camera_extrinsic_inv, pos)
130 alpha = label.box.heading - math.atan2(pos[2],pos[0])

the pos[2] and pos[0] is center_z and center_x in the camera frame
however in the camera frame of Waymo Dataset, z points up,
so I think maybe the code change to
alpha = label.box.heading - math.atan2(pos[1],pos[0])
Is it right or wrong?
and another question:
label.box.heading is in the vehicle frame , math.atan2(pos[2],pos[0]) is in the camera frame.
so the alpha is camera frame or not?

@gdlg
Copy link
Owner

gdlg commented Jun 8, 2020

Hi @sunjieee ,

Thanks for reporting, yes, the code sounds wrong. I used the heading but didn’t rely on the alpha so I might not have noticed the wrong value. I haven’t used the dataset in a while so if you have tested the fix, feel free to do a pull request. Otherwise I can have a look when I have got some spare time.

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