-
Notifications
You must be signed in to change notification settings - Fork 16
[BUG] The constructor of DQ does not work for pure dual quaternions #24
Copy link
Copy link
Closed
Description
Bug description
- It should be possible to create a DQ object from an Eigen vector with the pure dual quaternion coefficients, that is, a vector of size 6.
In fact, the library does not complain when creating a DQ from a vector of size 6. However, instead of creating a pure dual quaternion, it creates a DQ object with the first 6 elements equal to the elements of the vector, that is
q(0) + q(1)i + q(2)j + q(3)k + E*(q(4) + q(5)i + 0j + 0k)
instead of
0 + q(0)i + q(1)j + q(2)k + E*(0 + q(3)i + q(4)j + q(5)k).
To Reproduce
Code
#include <iostream>
#include <Eigen/Dense>
#include <dqrobotics/DQ.h>
#include <iostream>
using namespace DQ_robotics;
int main()
{
Eigen::VectorXd force(6);
force << 1, 2, 3, 4, 5, 6;
std::cout << DQ(force) << std::endl;
return 0;
}
Output
1 2i 3j 4k +E( 5 6i 0j 0k )
Expected behavior
Expected output
0 1i 2j 3k +E( 0 4i 5j 6k )
Environment:
- OS: Ubuntu16.04
- dqrobotics version: 0.1.0
Additional context
- It works fine in MATLAB version.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working