hengli / camodocal

CamOdoCal: Automatic Intrinsic and Extrinsic Calibration of a Rig with Multiple Generic Cameras and Odometry
Other
1.18k stars 390 forks source link

Eigen assertion during CamOdoThread constructor call #2

Closed ashokzg closed 11 years ago

ashokzg commented 11 years ago

The assertion is

# INFO: Initializing... extrinsics: /usr/include/eigen3/Eigen/src/Core/DenseStorage.h:69: Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 16>::plain_array() [with T = double, int Size = 16, int MatrixOrArrayOptions = 0]: Assertion `(reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****"' failed.

The fix, that I tried (and worked), was to add the EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro to the public part of the CamOdoThread class declaration. This I believe is required for the mCamOdoTransform member variable. Further explanation is given in the following pages.

http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html http://eigen.tuxfamily.org/dox-devel/group__TopicStructHavingEigenMembers.html

hengli commented 11 years ago

Committed bug fix.