I am trying to undertake a 3D transformation using SciPy using a rotation vector that is in degrees.
I am using the following to test the setup:
from scipy.spatial.transform import Rotation as R
import numpy as np
vector = np.array([1, 0, 0])
r = R.from_rotvec(np.array([0, 0, 90]), degrees=True)
however, it is throwing the following error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-33-73e8ed4e3d51> in <module>
1 vector = np.array([1, 0, 0])
----> 2 r = R.from_rotvec(np.array([0, 0, 90]), degrees=True)
3 r.as_matrix()
TypeError: from_rotvec() takes no keyword arguments
The documentation (https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.transform.Rotation.from_rotvec.html) states that from_rotvec should take degrees=True as a keyword argument (and I actually took my test example from the SciPy docs).
Does anyone know why this TypeError is being generated?