Open rakshith95 opened 5 years ago
Your compiler settings are not setup correctly.
If you look at the OpenGV CMakeLists.txt file you'll see that they add a few different definitions to compile the code correctly. Try compiling the tests by setting BUILD_TESTS=ON. You'll see that test_relative_pose uses fivept_kneip without any issues.
Add those definitions to your compilation and your code should run fine.
For example, if you're using cmake on a laptop, you just need to add this line to your CMakeLists.txt:
add_definitions(-march=native)
IMO having -march=native
is probably not a sensible default. Most people who use Eigen in their projects will probably not have that on by default, causing compilation to go through but Eigen to conk out during runtime when using OpenGV due to Eigen mismatch. (OpenGV compiled with optimized Eigen, against non-optimized user code).
I certainly got caught out and had spent some time on this issue. It would probably be best to either:
-march=native
default option
Running this gives the following error: double free or corruption (out) Aborted (core dumped
Any idea why this happens?