Code Monkey home page Code Monkey logo

Comments (5)

albertnew2012 avatar albertnew2012 commented on September 15, 2024 1

Hi @52SuyuZ I found the solution to solve this isse:

My original GTSAM is 4.0.3, which did not work. Then I found the following solution

wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.2.zip
cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
cd ~/Downloads/gtsam-4.0.2/
mkdir build && cd build
cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..
sudo make install -j8

You may run into Cmake debug error mentioned here , please comment out the lines as below, as descibed in this post
gtsam/wrap/CMakeLists.txt

set(WRAP_BOOST_LIBRARIES
  optimized
    ${Boost_FILESYSTEM_LIBRARY_RELEASE}
    ${Boost_SYSTEM_LIBRARY_RELEASE}
    ${Boost_THREAD_LIBRARY_RELEASE}
    #  debug
    #${Boost_FILESYSTEM_LIBRARY_DEBUG}
    #${Boost_SYSTEM_LIBRARY_DEBUG}
    #${Boost_THREAD_LIBRARY_DEBUG}
)

gtsam/CMakeLists.txt

if (GTSAM_DISABLE_NEW_TIMERS)
    message("WARNING:  GTSAM timing instrumentation manually disabled")
    list_append_cache(GTSAM_COMPILE_DEFINITIONS_PUBLIC DGTSAM_DISABLE_NEW_TIMERS)
else()
    if(Boost_TIMER_LIBRARY)
      list(APPEND GTSAM_BOOST_LIBRARIES
        optimized ${Boost_TIMER_LIBRARY_RELEASE}
        optimized ${Boost_CHRONO_LIBRARY_RELEASE}
        #debug ${Boost_TIMER_LIBRARY_DEBUG}
        #debug ${Boost_CHRONO_LIBRARY_DEBUG}
        )
    else()
      list(APPEND GTSAM_BOOST_LIBRARIES rt) # When using the header-only boost timer library, need -lrt
      message("WARNING:  GTSAM timing instrumentation will use the older, less accurate, Boost timer library because boost older than 1.48 was found.")
    endif()
endif()

Then it should work like a charm.

from fast_lio_lc.

GRF-Sunomikp31 avatar GRF-Sunomikp31 commented on September 15, 2024

I used gtsam4.0.2

from fast_lio_lc.

52SuyuZ avatar 52SuyuZ commented on September 15, 2024

Have you solved this problem?

from fast_lio_lc.

GRF-Sunomikp31 avatar GRF-Sunomikp31 commented on September 15, 2024

Yep!but I forget how to solve it~

from fast_lio_lc.

52SuyuZ avatar 52SuyuZ commented on September 15, 2024

嗨,我找到了解决这个问题的解决方案:

我原来的GTSAM是4.0.3,它不起作用。然后我找到了以下解决方案

wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.2.zip
cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
cd ~/Downloads/gtsam-4.0.2/
mkdir build && cd build
cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..
sudo make install -j8

您可能会遇到此处提到的Cmake调试错误,请注释掉以下行,如本文所述gtsam / wrap / CMakeLists.txt

set(WRAP_BOOST_LIBRARIES
  optimized
    ${Boost_FILESYSTEM_LIBRARY_RELEASE}
    ${Boost_SYSTEM_LIBRARY_RELEASE}
    ${Boost_THREAD_LIBRARY_RELEASE}
    #  debug
    #${Boost_FILESYSTEM_LIBRARY_DEBUG}
    #${Boost_SYSTEM_LIBRARY_DEBUG}
    #${Boost_THREAD_LIBRARY_DEBUG}
)

gtsam/CMakeLists.txt

if (GTSAM_DISABLE_NEW_TIMERS)
    message("WARNING:  GTSAM timing instrumentation manually disabled")
    list_append_cache(GTSAM_COMPILE_DEFINITIONS_PUBLIC DGTSAM_DISABLE_NEW_TIMERS)
else()
    if(Boost_TIMER_LIBRARY)
      list(APPEND GTSAM_BOOST_LIBRARIES
        optimized ${Boost_TIMER_LIBRARY_RELEASE}
        optimized ${Boost_CHRONO_LIBRARY_RELEASE}
        #debug ${Boost_TIMER_LIBRARY_DEBUG}
        #debug ${Boost_CHRONO_LIBRARY_DEBUG}
        )
    else()
      list(APPEND GTSAM_BOOST_LIBRARIES rt) # When using the header-only boost timer library, need -lrt
      message("WARNING:  GTSAM timing instrumentation will use the older, less accurate, Boost timer library because boost older than 1.48 was found.")
    endif()
endif()

然后它应该像魅力一样工作。

Thank you very much for your answer, it is very useful for me!

from fast_lio_lc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.