It is claimed in this paper: https://openaccess.thecvf.com/content_CVPR_2019/papers/Zhou_On_the_Continuity_of_Rotation_Representations_in_Neural_Networks_CVPR_2019_paper.pdf (page 5748)
that the mapping from mapping from rotations to quaternions is discontinuous at 180 degrees.
It doesn't seem true.
Rotation of 3.1 radians around z-axis:
Matrix
[ -0.9991351, -0.0415807, 0.0000000;
0.0415807, -0.9991351, 0.0000000;
0.0000000, 0.0000000, 1.0000000 ]
Quaternion
[ 0, 0, 0.9997838, 0.0207948 ]
Rotation of 3.3 radians around z-axis:
[ -0.9874797, 0.1577457, 0.0000000;
-0.1577457, -0.9874797, 0.0000000;
0.0000000, 0.0000000, 1.0000000 ]
Quaternion:
[ 0, 0, 0.996865, -0.0791209 ]
As we can see, the quaternion representation barely changed. I would hardly call this discontinuous.
Quoting https://apps.dtic.mil/sti/pdfs/AD1043624.pdf
In this case, if you always wanted to keep your 4th term positive, the quaternion for the rotation of 3.1 radians will be same which is
[ 0, 0, 0.9997838, 0.0207948 ] (1)
However when you talk about 3.3 radians and talking about unique quaternioins, to get the 4th term positive you'll have to multiply the entire quaternion by -1, i.e
-[0, 0, 0.996865, -0.0791209]
Which is equal to [0, 0, -0.99685, 0.079] (2)
Comparing quaternion (1) and quaternion (2) you can see a jump in the sign and hence the discontinuity at pi radians.