Open finostro opened 8 years ago
I reran gdb building on debug instead of RelWithDebInfo and it gave me an eigen alignment assertion fail, so I fixed it by moving the EIGEN_MAKE_ALIGNED_OPERATOR_NEW in the Thirdparty/g2o/g2o/types/sim3.h file as follows: From:
struct Sim3
{
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
protected:
Quaterniond r;
Vector3d t;
double s;
public:
Sim3()
{
r.setIdentity();
t.fill(0.);
s=1.;
}
Sim3(const Quaterniond & r, const Vector3d & t, double s)
: r(r),t(t),s(s)
{
}
to:
struct Sim3
{
protected:
Quaterniond r;
Vector3d t;
double s;
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Sim3()
{
r.setIdentity();
t.fill(0.);
s=1.;
}
Sim3(const Quaterniond & r, const Vector3d & t, double s)
: r(r),t(t),s(s)
{
}
Hi,
i encountered the same issue but the proposed solution does not seem to work for me. Any idea of how to investigate ? Thanks
Was this ever resolved? @jpiat @finostro @raulmur
Above solution doesnt work, Even I faced the same issue.
I got it to work by removing -march=native in CMakeList.text and compiling in RelDebInfo instead of Release. The bug seems to be caused by alignment issue and will appear depending on your architecture.
Le 13 janv. 2017 8:33 AM, "chaiein" notifications@github.com a écrit :
Above solution doesnt work, Even I faced the same issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/raulmur/ORB_SLAM2/issues/117#issuecomment-272379527, or mute the thread https://github.com/notifications/unsubscribe-auth/ACNWZBKq0F-L0rWq7C8ImtVQUtDotjCAks5rRyjlgaJpZM4I3uH4 .
In CMakeLists.txt of ORB_SLAM2 tried following options 1.Removed -march=native in set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -march=native ") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 -march=native")
. SET(CMAKE_BUILD_TYPE RelDebInfo) -
I got it solved. Thank you so much @jpiat .
This solve the issue but could lead the compiler to not fully use your specific processor. I'am still investigating a solution to this problem but this seems to be a g2o problem not something in ORB_SLAM2
If you install lastest stable release of Eigen, ORB_SLAM2 will not even start since Eigen will detected (assert) the alignement issue. The bus is clearly related with Sim3 type in g2o, but i have no clue of how to fix it. Surprisingly this problem does not seem to affect everybody, it might be interesting to know what the difference in setup for a working and non-working implementation.
I'am using GCC 5.4.0, Eigen 3.3, OpenCV 3.1
Check the latest commits
@jpiat Did you find a solution to the problem? I found that Eigen 3.3 was assuming that on 64-bit systems, glibc's malloc returns 16-byte-aligned pointers. You can see the Memory.h for more detail. I forced Eigen to do its own alignment and that allows the program at least to start. Then I have a problem with SEQuat.
I downloaded and ran just fine with opencv3.2 but when i changed to opencv3.1 I started getting this problem. I think this is the problem, don't know why but that's the only thing I changed.
Hello,
I am getting a segmentation fault when running Examples/Stereo/stereo_kitti with the sequence 00 of the kitti dataset. The error seems to come from the loopclosung procedure, specifically LoolClosing.cc at line 437: " CorrectedSim3[mpCurrentKF]=mg2oScw".
Here is the output of gdb with the error:
Any ideas on how to fix this?
Thanks!!