Issue
Does scipy.spatial.transform.Rotation
's rotvec
and euler
do the samething ? If not, how are they different ?
Solution
What are scipy.spatial.transform.Rotation
, ...rotvec
and ...euler
?
Well the documentation of ..Rotation
pretty much says it
This class [] provides an interface to initialize from and represent rotations with:
- Quaternions
- Rotation Matrices
- Rotation Vectors
- Modified Rodrigues Parameters
- Euler Angles
See https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.transform.Rotation.html
So scipy.spatial.transform.Rotation
is a generalized interface for rotations. There are those five ways of representing rotations including rotvec
and euler
. You can give a rotation in any of them using e.g. scipy.spatial.transform.Rotation.from_euler
. And once you have a rotation you can transform it to any of those representations using e.g. scipy.spatial.transform.Rotation.as_rotvec.
Why have such an interface?
The advantage of transforming a particular rotation to this generalized one is clear. You can convert between them and do things you usually wanna do with rotations. From the Rotation
docs again
The following operations on rotations are supported:
- Application on vectors
- Rotation Composition
- Rotation Inversion
- Rotation Indexing
Answered By - user2640045
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.