Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation fault when run ./testKimeraVIO #244

Open
PengZai opened this issue Dec 9, 2024 · 2 comments
Open

segmentation fault when run ./testKimeraVIO #244

PengZai opened this issue Dec 9, 2024 · 2 comments

Comments

@PengZai
Copy link

PengZai commented Dec 9, 2024

Description:
I'didn't recive any error when I build the code, 100% at the end.
but I got a segmentation fault when I test testKimeraVIO
I don't know how to do, help me?

do anyone try a successful version or combination of it? please tell me.

Command:

cd build
./testKimeraVIO

Console output:

[       OK ] LCDFixture.processAndAddMonoFrame (208 ms)
[ RUN      ] LCDFixture.processAndAddStereoFrame
I1209 21:14:52.626020 296818 LoopClosureDetector.cpp:70] LoopClosureDetector:: Loading vocabulary from ../tests/data/ForLoopClosureDetector/small_voc.yml.gz
I1209 21:14:52.630760 296818 LoopClosureDetector.cpp:73] Loaded vocabulary with 692 visual words.
I1209 21:14:52.856899 296818 LoopClosureDetector.cpp:194] LoopClosureDetector desctuctor called.
I1209 21:14:52.856983 296818 LcdThirdPartyWrapper.cpp:66] LcdThirdPartyWrapper desctuctor called.
[       OK ] LCDFixture.processAndAddStereoFrame (244 ms)
[ RUN      ] LCDFixture.geometricVerificationCam2d2d
I1209 21:14:52.868907 296818 LoopClosureDetector.cpp:70] LoopClosureDetector:: Loading vocabulary from ../tests/data/ForLoopClosureDetector/small_voc.yml.gz
I1209 21:14:52.873562 296818 LoopClosureDetector.cpp:73] Loaded vocabulary with 692 visual words.
I1209 21:14:53.042711 296818 LoopClosureDetector.cpp:70] LoopClosureDetector:: Loading vocabulary from ../tests/data/ForLoopClosureDetector/small_voc.yml.gz
I1209 21:14:53.047205 296818 LoopClosureDetector.cpp:73] Loaded vocabulary with 692 visual words.
I1209 21:14:53.047345 296818 LoopClosureDetector.cpp:194] LoopClosureDetector desctuctor called.
I1209 21:14:53.047386 296818 LcdThirdPartyWrapper.cpp:66] LcdThirdPartyWrapper desctuctor called.
**Segmentation fault (core dumped)**

Additional files:
Please attach all the files needed to reproduce the error.

Please give also the following information:

  • Kimera-Vio branch, tag or commit used: master
  • GTSAM version used: 4.2
  • OpenGV version used: just clone from the source code but didn't change, that is master branch
  • OpenCV version used: type opencv_version: 3.4.0
  • Operating system and version (e.g. Ubuntu 16.04 or Windows 10): Ubuntu 20.04
  • Did you change the source code? (yes / no): yes
    I add #include <opencv2/viz.hpp> in include/frontend/Camera.h for solve some error during build
    I change all "Tracker" to "VIO::Tracker" in tests/testTracker.cpp for solving the definition of ambiguity, since there is a lib named Tracker in Opencv
@PengZai
Copy link
Author

PengZai commented Dec 10, 2024

and even I run another test example, ./scripts/stereoVIOEuroc.bash, it still occurs Segmentation fault, but there are no any clues for debugging. please help me

output in terminal like that

I1210 10:55:55.240368 21104 EurocDataProvider.cpp:89] Parsing Euroc dataset...
W1210 10:55:55.695256 21104 EurocDataProvider.cpp:745] Value for final_k, 10000 is larger than total number of frames in dataset 2700
W1210 10:55:55.695338 21104 EurocDataProvider.cpp:748] Using final_k = 2700
I1210 10:55:55.874207 21104 RegularVioBackend.cpp:115] Using Regular VIO Backend.
I1210 10:55:56.151775 21104 PipelineModule.h:451] MISO Pipeline Module: Display has no output queue registered.
I1210 10:55:56.152212 21104 Pipeline.cpp:352] Pipeline Modules launched (parallel_run set to 1).
I1210 10:55:56.153677 21186 Pipeline.cpp:102] Spinning Kimera-VIO.
I1210 10:55:56.153764 21187 Pipeline.cpp:167] Shutting down VIO pipeline once processing has finished.
I1210 10:55:56.153810 21187 Pipeline.cpp:180]
I1210 10:55:56.163692 21185 EurocDataProvider.cpp:126] Running dataset between frame 50 and frame 2700
I1210 10:55:56.653965 21187 Pipeline.cpp:180] Statistics
----------- # log hz {avg +- std} [min, max] last
data_provider_left_frame_queue Size [#] 3 5.7 {1.0 +- 0.0} [1.0, 1.0] 1.0
data_provider_right_frame_queue Size [#] 3 5.3 {1.0 +- 0.0} [1.0, 1.0] 1.0
frontend_input_queue Size [#] 2 2.8 {1.0 +- 0.0} [1.0, 1.0] 1.0
./scripts/stereoVIOEuroc.bash: line 111: 21104 Segmentation fault (core dumped) $BUILD_PATH/stereoVIOEuroc --dataset_type="$DATASET_TYPE" --dataset_path="$DATASET_PATH" --initial_k=50 --final_k=10000 --params_folder_path="$PARAMS_PATH" --use_lcd="$USE_LCD" --vocabulary_path="$VOCABULARY_PATH/ORBvoc.yml" --flagfile="$PARAMS_PATH/flags/stereoVIOEuroc.flags" --flagfile="$PARAMS_PATH/flags/Mesher.flags" --flagfile="$PARAMS_PATH/flags/VioBackend.flags" --flagfile="$PARAMS_PATH/flags/RegularVioBackend.flags" --flagfile="$PARAMS_PATH/flags/Visualizer3D.flags" --logtostderr=1 --colorlogtostderr=1 --log_prefix=1 --v=0 --vmodule=Pipeline*=00 --log_output="$LOG_OUTPUT" --log_euroc_gt_data="$LOG_OUTPUT" --save_frontend_images=1 --visualize_frontend_images=1 --output_path="$OUTPUT_PATH"

@PengZai
Copy link
Author

PengZai commented Dec 10, 2024

image

today, I just run ./build/stereoVIOEuroc, plus some parameters in script, it could run, and when the --use_lcd=0 the Segmentation fault (core dumped) not happen again, like

./stereoVIOEuroc --dataset_type=0 --dataset_path=/mnt/d/zhipeng/datasets/Euroc_MAV/euroc-spark/MH_02_easy --initial_k=50 --final_k=10000 --params_folder_path=../params/Euroc --use_lcd=0 --vocabulary_path=$VOCABULARY_PATH/ORBvoc.yml --flagfile=../params/Euroc/flags/stereoVIOEuroc.flags --flagfile=../params/Euroc/flags/Mesher.flags --flagfile=../params/Euroc/flags/VioBackend.flags --flagfile=../params/Euroc/flags/RegularVioBackend.flags --flagfile=../params/Euroc/flags/Visualizer3D.flags --logtostderr=1 --colorlogtostderr=1 --log_prefix=1 --v=0 --vmodule=Pipeline*=00 --log_output=1 --log_euroc_gt_data=1 --save_frontend_images=1 --visualize_frontend_images=1 --output_path=../output_logs

if I set --use_lcd=1, that means loop closure detection is enable, then the Segmentation fault will happen again during the process running.

by debug, I find this happen in opengv, ransac module

image

then I check the git repository of laurentkneip/opengv#88, and
laurentkneip/opengv#73

it seems opengv was built within CXX_STANDRD 11, but Kimera-VIO was built within 17. so I change the CMakeLists.txt in opengv, like
set CXX_STANDARD 17
command the line 39 add_definitions (-march=native) that is for CXX_STANDARD 11

then, remove all the packages of opengv that have been installed, rebulid opengv and Kimera again.
I could pass all the test when I run ./testKimeraVIO

more over the mapping procedure seems fail during the code running. is that the problem of configuration or just the algorithm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant