MIT-SPARK / TEASER-plusplus

A fast and robust point cloud registration library
MIT License
1.81k stars 344 forks source link

[QUESTION] when use vscode debug,I get some errors . #186

Closed Runasia closed 3 months ago

Runasia commented 6 months ago

Have you read the documentation?

Post your theoretical questions / usage questions here.

I am a beginner,, and thank you for your assistance.

I want to debug code in vscode ,but when i click debug button image

this is my cmakelist cmake_minimum_required(VERSION 3.10) project(teaser_cpp_cptry) set(CMAKE_CXX_STANDARD 14) FIND_PACKAGE( OpenMP REQUIRED) find_package(Eigen3 REQUIRED) find_package(teaserpp REQUIRED) add_executable(teaser_cpp_cptry teaser_cpp_cptry.cc) target_link_libraries(teaser_cpp_cptry Eigen3::Eigen teaserpp::teaser_registration teaserpp::teaser_io OpenMP::OpenMP_CXX) file(COPY ${CMAKE_SOURCE_DIR}/../example_data/ DESTINATION ${CMAKE_BINARY_DIR}/example_data/ FILES_MATCHING PATTERN *.ply)

I can use command --cmake .. && make ..... /teaser_cpp_cptry can get teaser_cpp_cptry ,and get result just like this .

      TEASER++ Results           

Expected rotation: 0.996927 0.0668736 -0.0406664 -0.066129 0.997618 0.0194009 0.0418676 -0.0166518 0.998978 Estimated rotation: 0.996658 0.0729647 0.0367288 -0.0740469 0.996832 0.0290182 -0.0344951 -0.0316408 0.998904 Error (deg): 0.0783556

Expected translation: -0.115577 -0.0387705 0.114875 Estimated translation: -0.116132 -0.0390858 0.11729 Error (m): 0.00249818

Number of correspondences: 1889 Number of outliers: 1700 Time taken (s): 0.786677 image

so i need some change or use anther ide or debug tool ? thanks! I will continue to search for solutions or methods to configure .

jingnanshi commented 6 months ago

just to clarify your CMakeList file works in terminal but not in VSCode?

Runasia commented 6 months ago

just to clarify your CMakeList file works in terminal but not in VSCode?

Yes! but i'm not sure is CMakeList Mistake or something .

Runasia commented 6 months ago

I find use "-fopenmp" in task.json can solve openMP ,but another undefined still exists.

image

Runasia commented 6 months ago

Can't do anything , how to Configure debug environment in vscode ... due to this .. image

jingnanshi commented 5 months ago

the std::bad_alloc might be due to memory overflow. Regarding VSCode, there seems to be a linker error but unfortunately I am not familiar with VSCode configuration.

Runasia commented 5 months ago

the std::bad_alloc might be due to memory overflow. Regarding VSCode, there seems to be a linker error but unfortunately I am not familiar with VSCode configuration.

good night ! thinks for your reply , can i know how IDEA or something to debug code ?
and memory overflow ,That 's maybe due to that i run code in VMware and memory is too small... Thank you .