Skip to content
Snippets Groups Projects

Eigen pred

Merged Jeremie Deray requested to merge eigen_pred into master
  • Add dummy print gtest macro PRINT_TEST_FINISHED -> simply prints test & test-case name once test-case has finished.
  • Moved (well copied) MatrixSizeCheck to separate file & added VectorSizeCheck & RowVectorSizeCheck aliases
  • Add plenty of predicates (lambdas functions) to test Eigen-related things - e.g. later use in gtest test macro
  • Add a getYaw function to rotation.h

Merge request reports

Merged by Joan Solà OrtegaJoan Solà Ortega 7 years ago (Oct 25, 2017 8:51am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Developer

    @jsola could you please review the src/eigen_predicates.h file ??

  • Did you modify ASSERT_EIGEN_MATRIX etc... in some way?

    I do not fully see what you did, and why. The ASSERTS is tests are rather complicated to write. Is this the intention, to use them like this to test EIGEN matrices? Or you just test the eigen_pred stuff?

  • mentioned in commit c6999729

  • Merged anyway

  • Author Developer

    @jsola I did not modify the gtest macros as I was looking for a way to compose lambda in those macro.
    The 'predicates' functions are are indeed meant for testing. That's why I was asking you to review them (e.g. pred_quat_is_approx) to make sure the math make sens.

  • Jeremie, your code:

    pred_zero( log_q(rhs * lhs.inverse())

    is correct. I however would prefer:

    pred_zero( log_q(rhs.inverse() * lhs)

    because it better fits our definitions for operator diff() in manifolds.

    Also, we may use conjugate() instead of inverse(), which for unit quaternions is the same but faster:

    pred_zero( log_q(rhs.conjugate() * lhs)

    Finally, instead of log_q, one can simply look at the vector part for zero-ness, and therefore this is even faster:

    pred_zero( (rhs.conjugate() * lhs).vec() )

    I believe going faster than this involves going inside the quaternion math, and I would not recommend it.

    Edited by Joan Solà Ortega
  • Author Developer

    Thanks.
    Side note: since those function are primarily meant for gtest speed in not a concern.

  • True... :-)

Please register or sign in to reply
Loading