代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 2.8)
project(orb_slam3_ros_wrapper)
# Change this to your installation of ORB-SLAM3. Default is ~/
set(ORB_SLAM3_DIR
$ENV{HOME}/Packages/ORB_SLAM3
)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++14")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
find_package (catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
cv_bridge
image_transport
tf
sensor_msgs
message_generation
)
find_package(OpenCV REQUIRED)
MESSAGE("OPENCV VERSION:")
MESSAGE(${OpenCV_VERSION})
find_package(Eigen3 REQUIRED)
MESSAGE("Eigen3 VERSION:")
MESSAGE(${Eigen3_VERSION})
find_package(Pangolin REQUIRED)
catkin_package (
CATKIN_DEPENDS roscpp rospy std_msgs cv_bridge image_transport tf sensor_msgs message_runtime
LIBRARIES {PROJECT_NAME}
)
include_directories(
${ORB_SLAM3_DIR}
${ORB_SLAM3_DIR}/include
${ORB_SLAM3_DIR}/include/CameraModels
${ORB_SLAM3_DIR}/Thirdparty/Sophus
${PROJECT_SOURCE_DIR}/include
${EIGEN3_INCLUDE_DIR}
${catkin_INCLUDE_DIRS}
${Pangolin_INCLUDE_DIRS}
)
# Build ROS nodes
set(LIBS
${ORB_SLAM3_DIR}/lib/libORB_SLAM3.so
${EIGEN3_LIBS}
${catkin_LIBRARIES}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
)
# mono node
add_executable (${PROJECT_NAME}_mono
src/mono_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_mono
${LIBS}
)
# stereo node
add_executable (${PROJECT_NAME}_stereo
src/stereo_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_stereo
${LIBS}
)
# mono-inertial node
add_executable (${PROJECT_NAME}_mono_inertial
src/mono_inertial_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_mono_inertial
${LIBS}
)
# stereo-inertial node
add_executable (${PROJECT_NAME}_stereo_inertial
src/stereo_inertial_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_stereo_inertial
${LIBS}
)
# RGB-D node
add_executable (${PROJECT_NAME}_rgbd
src/rgbd_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_rgbd
${LIBS}
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。