rigid_body_motion.from_euler_angles¶
- rigid_body_motion.from_euler_angles(rpy=None, roll=None, pitch=None, yaw=None, axis=- 1, order='rpy', return_quaternion=False)[source]¶
Construct quaternions from Euler angles.
This method differs from the method found in the quaternion package in that it is actually useful for converting commonly found Euler angle representations to quaternions.
- Parameters
- rpy: array-like, shape (…, 3, …), optional
Array with roll, pitch and yaw values. Mutually exclusive with roll, pitch and yaw arguments.
- roll: array-like, optional
Array with roll values. Mutually exclusive with rpy argument.
- pitch: array-like, optional
Array with pitch values. Mutually exclusive with rpy argument.
- yaw: array-like, optional
Array with yaw values. Mutually exclusive with rpy argument.
- axis: int, default -1
Array axis representing RPY values of rpy argument.
- order: str, default “rpy”
Order of consecutively applied rotations. Defaults to roll -> pitch -> yaw.
- return_quaternion: bool, default False
If True, return result as quaternion dtype.
- Returns
- q: array-like
Array with quaternions