liegroups icon indicating copy to clipboard operation
liegroups copied to clipboard

Extra care needed for np.sin(theta) where theta = +np.pi or -np.pi ?

Open Carpetfizz opened this issue 3 years ago • 0 comments

Hello,

In the so3.log function

https://github.com/utiasSTARS/liegroups/blob/fe1d376b7d33809dec78724b456f01833507c305/liegroups/numpy/so3.py#L205

There's a division by np.sin(angle) but there isn't a check to see if angle is +np.pi or -np.pi. I understand that due to numerical precision, np.sin(np.pi) != 0.0 but I'm wondering if there needs to be some extra care taken here.

See

https://en.wikipedia.org/wiki/Axis–angle_representation#Log_map_from_SO(3)to%7F'%22%60UNIQ--postMath-0000000D-QINU%60%22'%7F(3)

Carpetfizz avatar Sep 22 '21 21:09 Carpetfizz