HKUST-Aerial-Robotics / VINS-Mono

A Robust and Versatile Monocular Visual-Inertial State Estimator
GNU General Public License v3.0
4.92k stars 2.09k forks source link

vins_estimator fail to run #15

Closed mlyarthur closed 7 years ago

mlyarthur commented 7 years ago

Hello!when i run the vins_estimator node for the first time ,there is an error of Eigen ,and i think i solve it following the instruction of http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html. However it still failed with another error like this .

and the second picture is information with GDB debugger

the error seems to happen when delete ![Uploading snapshot1.png…]() the pointer,but i dont modify any code . ![Uploading gdb.jpeg…]()

mlyarthur commented 7 years ago

i am sorry it failed to upload the picture .so i try again to show them.

snapshot1 the second picture is information with GDB debugger gdb

qintonguav commented 7 years ago

Sorry, I haven't met your problem. Maybe the compatibility problem of Eigen or Ceres. Try to use the same version of what I use. If the problem still exists, tell me later.

mlyarthur commented 7 years ago

... but I check the version of Eigen or Ceres on my computer,which are 3.2.0 and 1.12.0 respectively.And i followed the ceres solver installation instruction strictly . i solve the previous eigen problem by adding this macro in IntegrationBase class . image but i dont know if there is a connection between the new problem and this old one i use gdb to find the location where it crash delete it_0->second.pre_integration; image

qintonguav commented 7 years ago

Actually, you can delete this sentence, "delete it_0->second.pre_integration". It doesn't matter except very little memory.

Try again.

mlyarthur commented 7 years ago

sorry ,i want to ask a easy question about the version of Eigen. i just use apt-get libeigen3-dev
which indicate the version of 3.2.0 image

but when i cmake ,it says that the version is 3.3.3 in following picture image

qintonguav commented 7 years ago

In fact, there are two Eigen in your system, which causes the problem. One is in /usr/include/eigen3/ ... another one is in /usr/local/include/eigen3/ The cmake file will help you to find one Eigen https://github.com/HKUST-Aerial-Robotics/VINS-Mono/blob/master/support_files/cmake/FindEigen.cmake However, Eigen 3.3.3 is its finding result, which is not compatible with my code.

You can remove Eigen 3.3.3 or hard code the path of Eigen in CMakeLists.

set(EIGEN_INCLUDE_DIR "/usr/include/eigen3") include_directories(${EIGEN_INCLUDE_DIRS})

Make sure Ceres and VINS find the same Eigen 3.2...

mlyarthur commented 7 years ago

I change the version of eigen to 3.2.0 image but the previous problem happens again so i think the version doesnt matter image it is the location of the problem i meet ,it says eigen have some allign error.i am still confused. image

qintonguav commented 7 years ago

can you use cat /usr/local/include/eigen3/Eigen/src/Core/util/Macros.h | grep VERSION to check your Eigen version.

I doubt two versions of Eigen is mixed on your computer.

mlyarthur commented 7 years ago

this command give me the result like this image it means two versions are both 3.2.0.so....

qintonguav commented 7 years ago

rebuild Ceres.

The Ceres which you build previously may depend on 3.3... Now you need to rebuild it, to make sure Ceres and VINS depend on the same Eigen 3.2

mlyarthur commented 7 years ago

In fact i rebuild Ceres an VINS when i remove the version 3.3.3 of eigen ,and i now make sure both of them have the same Eigen depencies bacause only one version exsits now .the eigen is located in /usr/include.And there is still error with eigen which keep the same with previous one.

qintonguav commented 7 years ago

Try remove devel and build folder in catkin_ws, catkin_make again.

I have tried Eigen 3.3.3. VINS_mono runs successfully under Eigen 3.3.3.

mlyarthur commented 7 years ago

Do you mean VINS-MONO uses /home/exbot/catkin_ws/src/VINS-Mono/support_files/cmake/FindEigen.cmake to find the location of Eigen?

qintonguav commented 7 years ago

I am afraid some people can't find the same Eigen with Ceres in their computer, so I additionally put a FindEigen.cmake file in support files to help them.

mlyarthur commented 7 years ago

I want to know the system version of Ubuntu,and i work on Ubuntu 14.04 32Bit

mlyarthur commented 7 years ago

I doubt if there is problem with system version,do you work on 32bit system?

qintonguav commented 7 years ago

I haven't tested it on the 32bit system. What I use is 14.04 and 16.04 with 64 bit. Maybe is the 32-bit issue. Thanks.

mlyarthur commented 7 years ago

I test it on the ubuntu 14.04 64bit successfully...thanks for your kind instruction.