Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small matrix calc speedup in collision_distance_field_types #666

Merged
merged 4 commits into from
Oct 2, 2021

Conversation

AndyZe
Copy link
Member

@AndyZe AndyZe commented Sep 5, 2021

I thought it would be a good idea to scour the codebase for places where the fact that (rotation matrix transpose) == (rot. matrix inverse) could be used to speed up calculations. Since a transpose is cheaper than an inverse.

This is the only place I found where that applies.

Eigen has some internal optimizations for Isometry3d types, but I doubt it's smart enough to look ahead and realize it only needs to invert the 3x3 rotation matrix.

Reviewers will need a slightly advanced background in linear algebra, which is why I tagged @mamoll and @v4hn.

@codecov
Copy link

codecov bot commented Sep 5, 2021

Codecov Report

Merging #666 (2f26a02) into main (11e7cf4) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #666      +/-   ##
==========================================
- Coverage   54.19%   54.18%   -0.01%     
==========================================
  Files         192      192              
  Lines       20187    20187              
==========================================
- Hits        10939    10936       -3     
- Misses       9248     9251       +3     
Impacted Files Coverage Δ
...on_distance_field/collision_distance_field_types.h 61.06% <0.00%> (ø)
...dl_kinematics_plugin/src/kdl_kinematics_plugin.cpp 74.72% <0.00%> (-1.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11e7cf4...2f26a02. Read the comment docs.

@AndyZe AndyZe requested review from mamoll and v4hn September 13, 2021 13:30
@AndyZe AndyZe merged commit bf39dca into moveit:main Oct 2, 2021
@simonschmeisser
Copy link
Contributor

I'm curious: did you measure a real speed-up here? I would expect Eigen to be smart enough here

@AndyZe
Copy link
Member Author

AndyZe commented Oct 11, 2021

I didn't actually benchmark it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants