charlesq34 / frustum-pointnets

Frustum PointNets for 3D Object Detection from RGB-D Data
Apache License 2.0
1.59k stars 538 forks source link

Why should we add np.pi/2 to rot angle? #89

Open lhyfst opened 5 years ago

lhyfst commented 5 years ago

https://github.com/charlesq34/frustum-pointnets/blob/2ffdd345e1fce4775ecb508d207e0ad465bcca80/train/provider.py#L224-L227

I don't know why adding np.pi/2.0 can help us to get the center view? Why does shifting the rot angle by pi/2 can be helpful to adjust GT heading angle directly? What is the function of np.pi/2?

Thanks

XixiLiu95 commented 5 years ago

Since frustum angle is different from heading angle. First, you need to calculate the rotate angle, rotate angle= pi/2-arctan(z/x), frustum angle=-arctan(z/x). the defination of heading angle is ry if you check the label information. After the coordinate is transfered to a center view, you need to do the same operation to the heading angle, GTs of heading angle = heading angle -rotate angle.

suryadheeshjith commented 3 years ago

Hello, the heading angle should be = - self.heading_list[index] - rot_angle right? self.heading_list[index] or ry corresponds to the "correction" angle right? It is a clockwise angle to essentially get 0 heading angle. What am I missing?

I would like to confirm this too - the heading angle 0 of a box refers to the case when its length dimension (longer sider on x-y plane) is parallel to x axis of its body coordinate frame.