opened
happinesslz
username_0
# calculate the ry after rotation
                x, z = aug_gt_boxes3d[:, 0], aug_gt_boxes3d[:, 2]
                beta = np.arctan2(z, x)
                new_ry = np.sign(beta) * np.pi / 2 + gt_alpha - beta
                aug_gt_boxes3d[:, 6] = new_ry   # TODO: not in [-np.pi / 2, np.pi / 2]

I compute "new_ry = np.sign(beta) * np.pi / 2 + gt_alpha - beta" from the ground-truth label, and find the equation is not true. For example:   a car label from the "000002.txt" file:
Car 0.00 0 -1.67 657.39 190.13 700.07 223.39 1.41 1.58 4.36 3.18 2.27 34.38 -1.58
beta = np.arctan2(z, x)=1.258
alpha = -1.67
so ry = 1* np.pi/2 + (-1.67)-1.258 = -1.35  is not equal  "-1.58"!!
I have verified several results, but the equation is still not true . Can you explain it? thanks!
Problem in computing the observation angle "alpha" and  rotation angle "ry" ???
issue
closed
happinesslz
username_0
issue
created
sshaoshuai
username_1
You wrongly calculate the beta.
In this sample, loc=(3.18, 2.27, 34.38), then
beta = np.arctan2(z, x) = np.arctan2(34.38, 3.18) = 1.4785
alpha = -1.67
Then, "ry = 1* np.pi/2 + (-1.67)-1.4785= -1.5777", which is approximately equal to -1.58.
comment
created
xjjs
username_2
shoudldn't it be "ry=alpha+(beta-pi/2)"?
comment
created
xjjs
username_2
shoudldn't it be "ry=alpha+(beta-pi/2)"?

such as http://hirotaka-hachiya.hatenablog.com/entry/2018/02/10/163432
comment
created
xjjs
username_2
from the data：ry=alpha-θ+pi/2，
but from the image: alpha=ry-θ+pi/2, why there is a difference?
http://hirotaka-hachiya.hatenablog.com/entry/2018/02/10/163432
comment