Open crowznl opened 1 week ago
This depends on the current optimizations implemented by Pytorch for functions such as cross
and einsum
, as well as their dependencies in your system. Although we prefer to use quat_rotate
, we rather recommend that you benchmark these functions with vectors and quaternion objects relevant to your task, so you can choose accordingly.
~/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/utils/math.py there are two functions for rotate a vector by a quaternion:
I know they are both simplified forms of $qvq^{-1}$ wiki
that $qvq^{-1} = [0, 2(\mathbf{u} \cdot \mathbf{v})\mathbf{u} + (2w^2 - 1)\mathbf{v} + 2w(\mathbf{u} \times \mathbf{v})] = [0, \mathbf{v} + 2w(\mathbf{u} \times \mathbf{v}) + \mathbf{u} \times (2\mathbf{u} \times \mathbf{v})]$
So which one is more efficient or more precise and is more recommended?