bullet3
bullet3 copied to clipboard
Replacing Linear Math with Eigen
Hi @erwincoumans,
I would like to continue the discussion started in #2508 . Here's a reiteration of my previous comment.
I was recently looking into this and I have some questions related to porting. I'm mainly interested in unifying SIMD optimizations and cleaning library's code a bit, because it has a lot of arch-specific SIMD ifdefs. Eigen definitely looks like a proper choice for optimizing LinearMath code; my main perceivable benefit is its backend support (a lot of archs), which should make bullet even faster across different platforms. However:
- According to this: https://gitlab.com/libeigen/eigen/-/issues/2447, they're gonna switch to C++14 in the future (can happen within few stable releases), and I've seen around the repo you've been trying to minimize this feature bump;
- They also appear to use STL for some things, which you've been against here (in the contribution guide);
Another question is testing: imagine I hooked all relevant LinearMath code to Eigen, how can I run unittests to verify it's working correctly? Right now build fails with the following error:
$ mkdir build && cd build && cmake .. -DBUILD_BULLET2_DEMOS=OFF && make ... Consolidate compiler generated dependencies of target Test_BulletInverseDynamicsJacobian [ 83%] Built target Test_BulletInverseDynamicsJacobian Consolidate compiler generated dependencies of target Test_BulletInverseForwardDynamics [ 87%] Built target Test_BulletInverseForwardDynamics Consolidate compiler generated dependencies of target Test_BulletInverseDynamics [ 87%] Built target Test_BulletInverseDynamics Consolidate compiler generated dependencies of target Test_PhysicsClientServer [ 88%] Linking CXX executable Test_PhysicsClientServer ld: library not found for -lBussIK clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [test/SharedMemory/Test_PhysicsClientServer] Error 1 make[1]: *** [test/SharedMemory/CMakeFiles/Test_PhysicsClientServer.dir/all] Error 2 make: *** [all] Error 2
And AppVeyor build seems to be running cmake --build . --target ALL_BUILD --config Release -- /maxcpucount:4 /verbosity:quiet
, which seems like a bit of an overkill to me... is there a way to build minimal ctest-ready build of bullet?
Thank you!