You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered some situations where given a pure dual quaternion wrench and a unit dual quaternion x, the Ad(x, wrench) operation is not returning a pure dual quaternion as expected.
To Reproduce
I have attached a minimal example that reproduces the problem. It arises when there are some residual values on the pose variable x (for instance, 10e-17) and the order of magnitude of the wrench variable starts to get sufficiently high. As the magnitude of the wrench keeps rising, the problem becomes more prominent. For a wrench composed of elements of the order of magnitude of 10e20/10e30, the numerical error appearing at the real part of the adjoint transformation's result can be as high as 10e15!
To deal with the reported problem, I have implemented a local version of the Ad() function that checks if x is a unit dual quaternion and wrench is a pure dual quaternion. If that is the case, it "purifies" the result of the transformation. The modification is given as follows.
function res = Ad(x,y)
if(is_unit(x) && is_pure(y))
res = x*y*x';
res.q(1) = 0;
res.q(5) = 0;
else
res = x*y*x';
end
end
This probably is not a good permanent solution but could give some insights into one.
Environment:
OS: Ubuntu 18.04.5 LTS
dqrobotics version: 20.04.0.1 (MATLAB Add-On)
MATLAB version: R2020a
The text was updated successfully, but these errors were encountered:
This is indeed an annoying numerical issue that might arise in pathological cases. However, I won't fix it as you suggested because your solution hides other issues the user might be doing wrong. In your example, the pure dual quaternion has a gigantic norm, which is a symptom of things going wrong elsewhere (a wrench in the order of 1e+15 will be unacceptable in most cases).
Also, I need to analyze it more to verify that the other components are numerically correct. Otherwise, just 'purifying' the dual quaternion might be geometrically incorrect.
Bug description
I have encountered some situations where given a pure dual quaternion wrench and a unit dual quaternion x, the Ad(x, wrench) operation is not returning a pure dual quaternion as expected.
To Reproduce
I have attached a minimal example that reproduces the problem. It arises when there are some residual values on the pose variable x (for instance, 10e-17) and the order of magnitude of the wrench variable starts to get sufficiently high. As the magnitude of the wrench keeps rising, the problem becomes more prominent. For a wrench composed of elements of the order of magnitude of 10e20/10e30, the numerical error appearing at the real part of the adjoint transformation's result can be as high as 10e15!
minimum_example_bug_ad.zip
Workaround
To deal with the reported problem, I have implemented a local version of the Ad() function that checks if x is a unit dual quaternion and wrench is a pure dual quaternion. If that is the case, it "purifies" the result of the transformation. The modification is given as follows.
This probably is not a good permanent solution but could give some insights into one.
Environment:
The text was updated successfully, but these errors were encountered: