Coder Social home page Coder Social logo

dual_quaternions's People

Contributors

achllle avatar emilld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dual_quaternions's Issues

catkin_python_setup() version in setup.py (0.3.0) differs from version in package.xml (0.3.1)

http://build.ros.org/job/Nbin_uF64__dual_quaternions__ubuntu_focal_amd64__binary/1/console

12:16:20 CMake Error at /opt/ros/noetic/share/catkin/cmake/catkin_python_setup.cmake:56 (message):
12:16:20   catkin_python_setup() version in setup.py (0.3.0) differs from version in
12:16:20   package.xml (0.3.1)
12:16:20 Call Stack (most recent call first):
12:16:20   CMakeLists.txt:8 (catkin_python_setup)

Looks like there's an issue with the 0.3.1 tag

version='0.3.0',

distance between 2 dual quaternion

Hello

First thanks a lot for this nice code,
I could not find a solution to compute the axis postion of the rotations, and then I realize one should use dual quaternion and I found your code, with the nice .screw method !

this is not really an issue, but I am just seeking for advise.
how would you define a distance between 2 quaternions ?

Many thanks

The sclerp algorithm does not converge

We find that the interpolation algorithm fails to converge when two double quaternions are close, leading to a very outrageous result.
As shown below, the terminal feedback position T is

array([[-1.50605828e-01,  9.78038623e-01,  1.44077536e-01,
        -1.28873894e+03],
       [ 1.31112452e-01,  1.64213295e-01, -9.77672501e-01,
        -3.56061344e+02],
       [-9.79860913e-01, -1.28352817e-01, -1.52964521e-01,
        -2.03949883e+02],
       [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         1.00000000e+00]])

here is the simplified code.

from scipy.spatial.transform import Rotation
import numpy as np
from dual_quaternions import DualQuaternion

T1 = np.array([[-1.20911060e-02, -9.99300112e-01,  3.53990259e-02,
        -4.36968382e+00],
       [ 9.93674343e-01, -1.59607498e-02, -1.11160043e-01,
         1.54711835e+01],
       [ 1.11647238e-01,  3.38310559e-02,  9.93171865e-01,
         9.34843861e-01],
       [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         1.00000000e+00]])

T2 = np.array([[-3.37726903e-02, -9.99344514e-01,  1.30364371e-02,
        -4.47583692e+00],
       [ 9.92807002e-01, -3.50451704e-02, -1.14481845e-01,
         1.54705164e+01],
       [ 1.14863668e-01,  9.07630609e-03,  9.93339800e-01,
         9.37977190e-01],
       [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         1.00000000e+00]])
# Rotation matrices
R1 = T1[:3, :3]
R2 = T2[:3, :3]

# euler angles
euler1 = Rotation.from_matrix(R1).as_euler('zyx')
euler2 = Rotation.from_matrix(R2).as_euler('zyx')

print("Euler angles for T1: ", euler1)
print("Euler angles for T2: ", euler2)

dq1 = DualQuaternion.from_homogeneous_matrix(T1)
dq2 = DualQuaternion.from_homogeneous_matrix(T2)
delta = 0.5
# sclerp
dq = DualQuaternion.sclerp(dq1, dq2, delta)
T = dq.homogeneous_matrix()

# Linear interpolation is not satisfied
np.dot(np.linalg.inv(T1), T) - np.dot(T, np.linalg.inv(T2))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.