Implement Eigen-like expression templates for spatial algebra computations#2551
Implement Eigen-like expression templates for spatial algebra computations#2551jorisv wants to merge 10 commits intostack-of-tasks:develfrom
Conversation
|
It's not really an Eigen expression, more "Eigen-like expression template". |
|
I allowed myself to re-title the PR @jorisv. Excellent initiative btw ! |
|
For the spatial benchmark, are we going to write it like we usually did for Pinocchio, or start switching to the more standard google bench ? I vote for the latter option. |
|
@ManifoldFR We will write it using google benchmark. We plan to port all benchmark to this library in the future. |
Excellent, I feel it will make our bench code much more professional. Is the port of all the benchmarks somewhere on the roadmap/issue tracker? We could work on that on the side. |
There was a problem hiding this comment.
👋 Hi,
This is a reminder message to assign an extra build label to this Pull Request if needed.
By default, this PR will be build with minimal build options (URDF support and Python bindings)
The possible extra labels are:
- build_collision (build Pinocchio with coal support)
- build_casadi (build Pinocchio with CasADi support)
- build_autodiff (build Pinocchio with CppAD support)
- build_codegen (build Pinocchio with CppADCodeGen support)
- build_extra (build Pinocchio with extra algorithms)
- build_mpfr (build Pinocchio with Boost.Multiprecision support)
- build_sdf (build Pinocchio with SDF parser)
- build_accelerate (build Pinocchio with APPLE Accelerate framework support)
- build_all (build Pinocchio with ALL the options stated above)
Thanks.
The Pinocchio development team.
…mpute SE3 transformation
bbada58 to
12a19c4
Compare
12a19c4 to
2a50c0b
Compare
jcarpent
left a comment
There was a problem hiding this comment.
I would suggest using Expression in full name for clarity and readibility.
jcarpent
left a comment
There was a problem hiding this comment.
Could you split benchmark refactorization and expression implementation to ease the review process?
| struct SE3ExprProduct; | ||
| template<typename RotProduct, typename TransProduct> | ||
| SE3ExprProduct<RotProduct, TransProduct> | ||
| make_se3_expr_product(RotProduct rot_prod, TransProduct trans_prod); |
There was a problem hiding this comment.
I would suggest a function make_product generic, that calls then a template specialization for readability.
ea17c42 to
8407d27
Compare
This PR aim to use Eigen expression to compute spatial algebra.
Our SE3 implementation (same for Motion, Force and Inertia) prevent to use the Eigen
noaliasfonction.This prevent the compiler to optimize the code well.
Some benchmark had shown that we can accelerate the forward kinematics computation time by 1.5x by using this trick.
TODO V1
TODO V2
Benchmark results
Setup:
SE3
Release + march=native
Release