A numpy-based rotation library
- Install numpy
The recommended way is installing the package using pip:
pip install git+https://github.com/ChristofDubs/[email protected]#egg=pyrotation
Alternatively, clone this repo:
git clone https://github.com/ChristofDubs/pyrotation.git
Example:
from pyrotation import quat_from_angle_axis, quat_from_roll_pitch_yaw
import numpy
q1 = quat_from_angle_axis(0.5, numpy.array([1,1,0]))
q2 = quat_from_roll_pitch_yaw(0.3, -0.8, 2.4)
q3 = q1.inverse() * q2
rot3 = q3.rotation_matrix()
To view all available functions, run pydoc pyrotation
in the terminal, or type import pyrotation
followed by help(pyrotation)
in a python file.