Git Product home page Git Product logo

Comments (5)

joansola avatar joansola commented on June 2, 2024

The error message tells you what-s going on: data is not normalized. In manif::SE(3), the rotation part is a Eigen::Quaternion, and the norm of the quaternion MUST BE 1.

To fix it, your original data must be correct:

  • You should make sure your original matrix has a valid rotation matrix (det(R) == 1 and R.tr*R == Id).

If it is correct, then it means that passing from float to double you miss some precision and that the data is not normalized.

  • Then what you can do is convert the rotation part to quaternion, then normalize the quaternnion, then construct the SE3 object from translation and quaternion.

from manif.

Tawsif84 avatar Tawsif84 commented on June 2, 2024

Hi Prof,

Thank you very much for this answer, i'll try straight away!

from manif.

joansola avatar joansola commented on June 2, 2024

You could alternatively raise the tolerance level of the tests by modifying some constant in manif, but first you should make sure that your original data is correct. If I remember correctly, our tests already considered the possibility of working with float with the selection of the appropriate tolerance level in the unit tests, and therefore I bet your first guess is look at your data.

If your data is OK but you still do not pass, please report back and we'll see if we raise the tolerance for the whole project. @artivis what is your opinion?

from manif.

Tawsif84 avatar Tawsif84 commented on June 2, 2024

Among other stuffs I've tried is to convert my 4x4 matrix which is basically the result of a 3d ICP to the tuple (tx, ty, ty, thetax, thetay, thetaz) as follows, then insert it in the SE3 constructor:

void Registration::convertTf2Vector(tf::Transform &tf_ ,
Eigen::Vector3d &tt,
Eigen::Vector3d &euler
)
{

Eigen::Isometry3d pose;
tf::transformTFToEigen(tf_, pose );

tt =  pose.translation();

tf::Matrix3x3 m(tf_.getRotation());

double roll, pitch, yaw;
m.getEulerYPR(yaw, pitch, roll);

euler << yaw, pitch, roll;

}

I will try to convert the tf to quaternion and translation and apply your recommendations, i'll let you know. Thank you very much for your valuable consideration, i feel privileged.

from manif.

joansola avatar joansola commented on June 2, 2024

Indeed, if your data starts from Euler angles, then you are better off converting it to quaternion directly. thanks for the feedback.

from manif.

Related Issues (20)

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.