Created
March 22, 2013 22:03
-
-
Save baalexander/5225140 to your computer and use it in GitHub Desktop.
Euler to Quaternion transformation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tf import transformations | |
# Docs for transformations.quaternion_from_euler | |
# You can get docs with transformations.quaternion_from_euler? and enter | |
#ai, aj, ak : Euler's roll, pitch and yaw angles | |
#axes : One of 24 axis sequences as string or encoded tuple | |
#q = quaternion_from_euler(1, 2, 3, 'ryxz') | |
#numpy.allclose(q, [0.310622, -0.718287, 0.444435, 0.435953]) | |
transformations.quaternion_from_euler(0, 0, -1.550) | |
#Output: array([ 0. , 0. , -0.69971608, 0.71442103]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'll need to
sudo apt-get install ros-groovy-tf
andsource /opt/ros/groovy/setup.bash
first.