pyquaternion package from pyquaternion repo

pyquaternion

Package Summary

Tags No category tags.
Version 0.9.6
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/Achllle/pyquaternion.git
VCS Type git
VCS Version noetic-devel
Last Updated 2020-03-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

quaternion operations

Additional Links

No additional links.

Maintainers

  • achille

Authors

  • achille

pyquaternion

Build Status

A fully featured, pythonic library for quaternion representation, manipulation, 3D animation and geometry.

Please visit the pyquaternion homepage for full information and the latest documentation.

Designed for Python 2.7+ and 3.0+

demo

Example: Smooth animation with interpolation between random orientations using the pyquaternion module.

Quickstart

Install from PyPI

$ pip install pyquaternion

Run the following for a basic overview. A copy of this example can be found in demo.py.

import pyquaternion


# Create a quaternion representing a rotation of +90 degrees about positive y axis.
my_quaternion = pyquaternion.Quaternion(axis=[0, 1, 0], degrees=90)

my_vector = [0, 0, 4]
my_rotated_vector = my_quaternion.rotate(my_vector)

print('\nBasic Rotation')
print('--------------')
print('My Vector: {}'.format(my_vector))
print('Performing rotation of {angle} deg about {axis}'.format(angle=my_quaternion.degrees, axis=my_quaternion.axis))
print('My Rotated Vector: {}'.format(my_rotated_vector))


# Create another quaternion representing no rotation at all
null_quaternion = pyquaternion.Quaternion(axis=[0, 1, 0], angle=0)

print('\nInterpolated Rotation')
print('---------------------')

# The following will create a sequence of 9 intermediate quaternion rotation objects
for q in pyquaternion.Quaternion.intermediates(null_quaternion, my_quaternion, 9, include_endpoints=True):
    my_interpolated_point = q.rotate(my_vector)
    print('My Interpolated Point: {point}\t(after rotation of {angle} deg about {axis})'.format(
        point=my_interpolated_point, angle=round(q.degrees, 4), axis=q.axis
    ))

print('Done!')

Example output:

Basic Rotation
--------------
My Vector: [0, 0, 4]
Performing rotation of 90.0 deg about [ 0.  1.  0.]
My Rotated Vector: [4.0, 0.0, 0.0]

Interpolated Rotation
---------------------
My Interpolated Point: [0.0, 0.0, 4.0]  (after rotation of 0.0 deg about [ 0.  0.  0.])
My Interpolated Point: [0.62573786016092348, 0.0, 3.9507533623805511]   (after rotation of 9.0 deg about [ 0.  1.  0.])
My Interpolated Point: [1.2360679774997898, 0.0, 3.8042260651806146]    (after rotation of 18.0 deg about [ 0.  1.  0.])
My Interpolated Point: [1.8159619989581872, 0.0, 3.5640260967534712]    (after rotation of 27.0 deg about [ 0.  1.  0.])
My Interpolated Point: [2.3511410091698921, 0.0, 3.2360679774997894]    (after rotation of 36.0 deg about [ 0.  1.  0.])
My Interpolated Point: [2.8284271247461903, 0.0, 2.8284271247461898]    (after rotation of 45.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.2360679774997894, 0.0, 2.3511410091698921]    (after rotation of 54.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.5640260967534712, 0.0, 1.8159619989581879]    (after rotation of 63.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.8042260651806146, 0.0, 1.2360679774997898]    (after rotation of 72.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.9507533623805515, 0.0, 0.62573786016092403]   (after rotation of 81.0 deg about [ 0.  1.  0.])
My Interpolated Point: [4.0, 0.0, 0.0]  (after rotation of 90.0 deg about [ 0.  1.  0.])
Done!

CHANGELOG

Changelog for package pyquaternion

0.9.6 (2020-02-10)

Post ROS package conversion

  • Change exec depend naming from numpy to python-numpy
  • Add numpy dependency to package.xml
  • Create catkin package, rename and move some files
  • Fix casting error in trace_method
  • Add setter for vector

0.9.5 (2019-02-10)

Pre ROS package conversion

  • Merge pull request #49 from KieranWynn/handedness-clarification reference frame clarification
  • Replac kwargs with atol and rtol explicitly
  • Updated index.md with examples of how to use new options
  • Update deploy config
  • Merge pull request #46 from e-kwsm/special-methods Add special methods: __abs_; __matmul_, __imatmul_ and __rmatmul__
  • minor fixes
  • Quaternion from Matrix Optional Args
  • Merge pull request #43 from Hojjatrt/master

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

Deps Name
1 catkin

System Dependencies

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged pyquaternion at answers.ros.org

pyquaternion package from pyquaternion repo

pyquaternion

Package Summary

Tags No category tags.
Version 0.9.6
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/Achllle/pyquaternion.git
VCS Type git
VCS Version master
Last Updated 2020-02-25
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

quaternion operations

Additional Links

No additional links.

Maintainers

  • achille

Authors

  • achille

pyquaternion

Build Status

A fully featured, pythonic library for quaternion representation, manipulation, 3D animation and geometry.

Please visit the pyquaternion homepage for full information and the latest documentation.

Designed for Python 2.7+ and 3.0+

demo

Example: Smooth animation with interpolation between random orientations using the pyquaternion module.

Quickstart

Install from PyPI

$ pip install pyquaternion

Run the following for a basic overview. A copy of this example can be found in demo.py.

import pyquaternion


# Create a quaternion representing a rotation of +90 degrees about positive y axis.
my_quaternion = pyquaternion.Quaternion(axis=[0, 1, 0], degrees=90)

my_vector = [0, 0, 4]
my_rotated_vector = my_quaternion.rotate(my_vector)

print('\nBasic Rotation')
print('--------------')
print('My Vector: {}'.format(my_vector))
print('Performing rotation of {angle} deg about {axis}'.format(angle=my_quaternion.degrees, axis=my_quaternion.axis))
print('My Rotated Vector: {}'.format(my_rotated_vector))


# Create another quaternion representing no rotation at all
null_quaternion = pyquaternion.Quaternion(axis=[0, 1, 0], angle=0)

print('\nInterpolated Rotation')
print('---------------------')

# The following will create a sequence of 9 intermediate quaternion rotation objects
for q in pyquaternion.Quaternion.intermediates(null_quaternion, my_quaternion, 9, include_endpoints=True):
    my_interpolated_point = q.rotate(my_vector)
    print('My Interpolated Point: {point}\t(after rotation of {angle} deg about {axis})'.format(
        point=my_interpolated_point, angle=round(q.degrees, 4), axis=q.axis
    ))

print('Done!')

Example output:

Basic Rotation
--------------
My Vector: [0, 0, 4]
Performing rotation of 90.0 deg about [ 0.  1.  0.]
My Rotated Vector: [4.0, 0.0, 0.0]

Interpolated Rotation
---------------------
My Interpolated Point: [0.0, 0.0, 4.0]  (after rotation of 0.0 deg about [ 0.  0.  0.])
My Interpolated Point: [0.62573786016092348, 0.0, 3.9507533623805511]   (after rotation of 9.0 deg about [ 0.  1.  0.])
My Interpolated Point: [1.2360679774997898, 0.0, 3.8042260651806146]    (after rotation of 18.0 deg about [ 0.  1.  0.])
My Interpolated Point: [1.8159619989581872, 0.0, 3.5640260967534712]    (after rotation of 27.0 deg about [ 0.  1.  0.])
My Interpolated Point: [2.3511410091698921, 0.0, 3.2360679774997894]    (after rotation of 36.0 deg about [ 0.  1.  0.])
My Interpolated Point: [2.8284271247461903, 0.0, 2.8284271247461898]    (after rotation of 45.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.2360679774997894, 0.0, 2.3511410091698921]    (after rotation of 54.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.5640260967534712, 0.0, 1.8159619989581879]    (after rotation of 63.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.8042260651806146, 0.0, 1.2360679774997898]    (after rotation of 72.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.9507533623805515, 0.0, 0.62573786016092403]   (after rotation of 81.0 deg about [ 0.  1.  0.])
My Interpolated Point: [4.0, 0.0, 0.0]  (after rotation of 90.0 deg about [ 0.  1.  0.])
Done!

CHANGELOG

Changelog for package pyquaternion

0.9.6 (2020-02-10)

Post ROS package conversion

  • Change exec depend naming from numpy to python-numpy
  • Add numpy dependency to package.xml
  • Create catkin package, rename and move some files
  • Fix casting error in trace_method
  • Add setter for vector

0.9.5 (2019-02-10)

Pre ROS package conversion

  • Merge pull request #49 from KieranWynn/handedness-clarification reference frame clarification
  • Replac kwargs with atol and rtol explicitly
  • Updated index.md with examples of how to use new options
  • Update deploy config
  • Merge pull request #46 from e-kwsm/special-methods Add special methods: __abs_; __matmul_, __imatmul_ and __rmatmul__
  • minor fixes
  • Quaternion from Matrix Optional Args
  • Merge pull request #43 from Hojjatrt/master

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

Deps Name
1 catkin

System Dependencies

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged pyquaternion at answers.ros.org

pyquaternion package from pyquaternion repo

pyquaternion

Package Summary

Tags No category tags.
Version 0.9.6
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/Achllle/pyquaternion.git
VCS Type git
VCS Version master
Last Updated 2020-02-25
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

quaternion operations

Additional Links

No additional links.

Maintainers

  • achille

Authors

  • achille

pyquaternion

Build Status

A fully featured, pythonic library for quaternion representation, manipulation, 3D animation and geometry.

Please visit the pyquaternion homepage for full information and the latest documentation.

Designed for Python 2.7+ and 3.0+

demo

Example: Smooth animation with interpolation between random orientations using the pyquaternion module.

Quickstart

Install from PyPI

$ pip install pyquaternion

Run the following for a basic overview. A copy of this example can be found in demo.py.

import pyquaternion


# Create a quaternion representing a rotation of +90 degrees about positive y axis.
my_quaternion = pyquaternion.Quaternion(axis=[0, 1, 0], degrees=90)

my_vector = [0, 0, 4]
my_rotated_vector = my_quaternion.rotate(my_vector)

print('\nBasic Rotation')
print('--------------')
print('My Vector: {}'.format(my_vector))
print('Performing rotation of {angle} deg about {axis}'.format(angle=my_quaternion.degrees, axis=my_quaternion.axis))
print('My Rotated Vector: {}'.format(my_rotated_vector))


# Create another quaternion representing no rotation at all
null_quaternion = pyquaternion.Quaternion(axis=[0, 1, 0], angle=0)

print('\nInterpolated Rotation')
print('---------------------')

# The following will create a sequence of 9 intermediate quaternion rotation objects
for q in pyquaternion.Quaternion.intermediates(null_quaternion, my_quaternion, 9, include_endpoints=True):
    my_interpolated_point = q.rotate(my_vector)
    print('My Interpolated Point: {point}\t(after rotation of {angle} deg about {axis})'.format(
        point=my_interpolated_point, angle=round(q.degrees, 4), axis=q.axis
    ))

print('Done!')

Example output:

Basic Rotation
--------------
My Vector: [0, 0, 4]
Performing rotation of 90.0 deg about [ 0.  1.  0.]
My Rotated Vector: [4.0, 0.0, 0.0]

Interpolated Rotation
---------------------
My Interpolated Point: [0.0, 0.0, 4.0]  (after rotation of 0.0 deg about [ 0.  0.  0.])
My Interpolated Point: [0.62573786016092348, 0.0, 3.9507533623805511]   (after rotation of 9.0 deg about [ 0.  1.  0.])
My Interpolated Point: [1.2360679774997898, 0.0, 3.8042260651806146]    (after rotation of 18.0 deg about [ 0.  1.  0.])
My Interpolated Point: [1.8159619989581872, 0.0, 3.5640260967534712]    (after rotation of 27.0 deg about [ 0.  1.  0.])
My Interpolated Point: [2.3511410091698921, 0.0, 3.2360679774997894]    (after rotation of 36.0 deg about [ 0.  1.  0.])
My Interpolated Point: [2.8284271247461903, 0.0, 2.8284271247461898]    (after rotation of 45.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.2360679774997894, 0.0, 2.3511410091698921]    (after rotation of 54.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.5640260967534712, 0.0, 1.8159619989581879]    (after rotation of 63.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.8042260651806146, 0.0, 1.2360679774997898]    (after rotation of 72.0 deg about [ 0.  1.  0.])
My Interpolated Point: [3.9507533623805515, 0.0, 0.62573786016092403]   (after rotation of 81.0 deg about [ 0.  1.  0.])
My Interpolated Point: [4.0, 0.0, 0.0]  (after rotation of 90.0 deg about [ 0.  1.  0.])
Done!

CHANGELOG

Changelog for package pyquaternion

0.9.6 (2020-02-10)

Post ROS package conversion

  • Change exec depend naming from numpy to python-numpy
  • Add numpy dependency to package.xml
  • Create catkin package, rename and move some files
  • Fix casting error in trace_method
  • Add setter for vector

0.9.5 (2019-02-10)

Pre ROS package conversion

  • Merge pull request #49 from KieranWynn/handedness-clarification reference frame clarification
  • Replac kwargs with atol and rtol explicitly
  • Updated index.md with examples of how to use new options
  • Update deploy config
  • Merge pull request #46 from e-kwsm/special-methods Add special methods: __abs_; __matmul_, __imatmul_ and __rmatmul__
  • minor fixes
  • Quaternion from Matrix Optional Args
  • Merge pull request #43 from Hojjatrt/master

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

Deps Name
1 catkin

System Dependencies

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged pyquaternion at answers.ros.org