代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.18)
project(g2o_demo)
set(CMAKE_CXX_STANDARD 14)
#编译优化
set(CMAKE_C_FLAGS_Release "${CMAKE_C_FLAGS_Release} -O3")
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/third_party/include)
include_directories(${PROJECT_SOURCE_DIR}/third_party/include/suitesparse)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
include_directories(${Python3_INCLUDE_DIRS})
add_library(optimal_planner
src/optimal_planner.cpp
src/timed_elastic_band.cpp
src/obstacles.cpp
)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/lib/g2o)
target_link_libraries(optimal_planner PRIVATE
g2o_csparse_extension g2o_core
g2o_stuff g2o_types_slam2d g2o_types_slam3d g2o_solver_cholmod
g2o_solver_pcg g2o_solver_csparse g2o_incremental cxsparse)
add_executable(g2o_demo main.cpp )
target_link_libraries(g2o_demo
Python3::Python
optimal_planner)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。