From f2353f7cfe9a19d54b34c559dfd278d0b8e7be5e Mon Sep 17 00:00:00 2001 From: Jeremie Deray Date: Thu, 23 Oct 2014 17:24:08 +0200 Subject: [PATCH 1/5] catkinization on progress Conflicts: lsd_slam_core/CMakeLists.txt --- lsd_slam/CMakeLists.txt | 4 + lsd_slam/package.xml | 22 +++++ lsd_slam_core/CMakeLists.txt | 70 +++++++++------ lsd_slam_core/Makefile | 1 - lsd_slam_core/cfg/LSDDebugParams.cfg | 3 +- lsd_slam_core/cfg/LSDParams.cfg | 3 +- lsd_slam_core/cmake/FindEigen3.cmake | 81 ----------------- lsd_slam_core/cmake/FindG2O.cmake | 98 +++++++++++++++++++++ lsd_slam_core/cmake/FindSuiteParse.cmake | 1 + lsd_slam_core/manifest.xml | 17 ---- lsd_slam_core/package.xml | 35 ++++++++ lsd_slam_viewer/CMakeLists.txt | 84 ++++++++++-------- lsd_slam_viewer/Makefile | 1 - lsd_slam_viewer/cfg/LSDSLAMViewerParams.cfg | 3 +- lsd_slam_viewer/manifest.xml | 18 ---- lsd_slam_viewer/package.xml | 32 +++++++ stack.xml | 13 --- 17 files changed, 287 insertions(+), 199 deletions(-) create mode 100644 lsd_slam/CMakeLists.txt create mode 100644 lsd_slam/package.xml delete mode 100644 lsd_slam_core/Makefile delete mode 100644 lsd_slam_core/cmake/FindEigen3.cmake create mode 100644 lsd_slam_core/cmake/FindG2O.cmake delete mode 100644 lsd_slam_core/manifest.xml create mode 100644 lsd_slam_core/package.xml delete mode 100644 lsd_slam_viewer/Makefile delete mode 100644 lsd_slam_viewer/manifest.xml create mode 100644 lsd_slam_viewer/package.xml delete mode 100644 stack.xml diff --git a/lsd_slam/CMakeLists.txt b/lsd_slam/CMakeLists.txt new file mode 100644 index 00000000..28e6d3cc --- /dev/null +++ b/lsd_slam/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 2.8.3) +project(lsd_slam) +find_package(catkin REQUIRED) +catkin_metapackage() diff --git a/lsd_slam/package.xml b/lsd_slam/package.xml new file mode 100644 index 00000000..f8ac3844 --- /dev/null +++ b/lsd_slam/package.xml @@ -0,0 +1,22 @@ + + + lsd_slam + 0.0.0 + + Large-Scale Direct Monocular SLAM + + + Jakob Engel + Jakob Engel + see http://vision.in.tum.de/lsdslam + http://vision.in.tum.de/lsdslam + + TODO + catkin + lsd_slam_core + lsd_slam_viewer + + + + + diff --git a/lsd_slam_core/CMakeLists.txt b/lsd_slam_core/CMakeLists.txt index 971f8b1d..9ebae2fe 100644 --- a/lsd_slam_core/CMakeLists.txt +++ b/lsd_slam_core/CMakeLists.txt @@ -1,23 +1,30 @@ cmake_minimum_required(VERSION 2.8.7) project(lsd_slam_core) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) -# Set the build type. Options are: -# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage -# Debug : w/ debug symbols, w/o optimization -# Release : w/o debug symbols, w/ optimization +# Set the build type. Options are: +# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage +# Debug : w/ debug symbols, w/o optimization +# Release : w/o debug symbols, w/ optimization # RelWithDebInfo : w/ debug symbols, w/ optimization -# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries -set(ROS_BUILD_TYPE Release) - -rosbuild_init() +# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries +set(CMAKE_BUILD_TYPE Release) + +find_package(catkin REQUIRED COMPONENTS + cv_bridge + dynamic_reconfigure + sensor_msgs + image_transport + roscpp + rosbag +) -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) -set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) +find_package(Eigen REQUIRED) +include(cmake/FindG2O.cmake) +include(cmake/FindSuiteParse.cmake) -find_package(Eigen3 REQUIRED) -find_package(SuiteParse REQUIRED) # Apparently needed by g2o +message("-- CHOLMOD_INCLUDE_DIR : " ${CHOLMOD_INCLUDE_DIR}) +message("-- CSPARSE_INCLUDE_DIR : " ${CSPARSE_INCLUDE_DIR}) +message("-- G2O_INCLUDE_DIR : " ${G2O_INCLUDE_DIR}) # FabMap # uncomment this part to enable fabmap @@ -26,19 +33,24 @@ find_package(SuiteParse REQUIRED) # Apparently needed by g2o #add_definitions("-DHAVE_FABMAP") #set(FABMAP_LIB openFABMAP ) -# Dynamic Reconfigure Services -rosbuild_find_ros_package(dynamic_reconfigure) -include(${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake) -gencfg() +generate_dynamic_reconfigure_options( + cfg/LSDDebugParams.cfg + cfg/LSDParams.cfg +) + +catkin_package( + LIBRARIES lsdslam + DEPENDS Eigen SuiteSparse + CATKIN_DEPENDS libg2o +) # SSE flags -rosbuild_check_for_sse() add_definitions("-DUSE_ROS") add_definitions("-DENABLE_SSE") # Also add some useful compiler flag set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} ${SSE_FLAGS} -march=native -std=c++0x" + "${CMAKE_CXX_FLAGS} -march=native -Wall -std=c++0x" ) # Set source files @@ -73,6 +85,7 @@ set(SOURCE_FILES ) include_directories( + include ${EIGEN3_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/thirdparty/Sophus @@ -82,17 +95,20 @@ include_directories( # build shared library. -rosbuild_add_library(lsdslam SHARED ${SOURCE_FILES}) -target_link_libraries(lsdslam ${FABMAP_LIB} g2o_core g2o_stuff csparse cxsparse g2o_solver_csparse g2o_csparse_extension g2o_types_sim3 g2o_types_sba) -rosbuild_link_boost(lsdslam thread) +add_library(lsdslam SHARED ${SOURCE_FILES}) +target_link_libraries(lsdslam ${FABMAP_LIB} ${G2O_LIBRARIES} ${catkin_LIBRARIES} csparse cxsparse ) +#rosbuild_link_boost(lsdslam thread) # build live ros node -rosbuild_add_executable(live_slam src/main_live_odometry.cpp) -target_link_libraries(live_slam lsdslam) +add_executable(live_slam src/main_live_odometry.cpp) +target_link_libraries(live_slam lsdslam ${catkin_LIBRARIES} ${G2O_LIBRARIES}) # build image node -rosbuild_add_executable(dataset src/main_on_images.cpp) -target_link_libraries(dataset lsdslam) +add_executable(dataset src/main_on_images.cpp) +target_link_libraries(dataset lsdslam ${catkin_LIBRARIES} ${G2O_LIBRARIES}) + +# TODO add INSTALL + diff --git a/lsd_slam_core/Makefile b/lsd_slam_core/Makefile deleted file mode 100644 index bbd3fc60..00000000 --- a/lsd_slam_core/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake.mk diff --git a/lsd_slam_core/cfg/LSDDebugParams.cfg b/lsd_slam_core/cfg/LSDDebugParams.cfg index ca3a0c6f..cdad597a 100755 --- a/lsd_slam_core/cfg/LSDDebugParams.cfg +++ b/lsd_slam_core/cfg/LSDDebugParams.cfg @@ -1,10 +1,9 @@ #! /usr/bin/env python PACKAGE='lsd_slam_core' -import roslib; roslib.load_manifest(PACKAGE) #from driver_base.msg import SensorLevels -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/lsd_slam_core/cfg/LSDParams.cfg b/lsd_slam_core/cfg/LSDParams.cfg index 99282195..4c2acfb3 100755 --- a/lsd_slam_core/cfg/LSDParams.cfg +++ b/lsd_slam_core/cfg/LSDParams.cfg @@ -1,10 +1,9 @@ #! /usr/bin/env python PACKAGE='lsd_slam_core' -import roslib; roslib.load_manifest(PACKAGE) #from driver_base.msg import SensorLevels -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/lsd_slam_core/cmake/FindEigen3.cmake b/lsd_slam_core/cmake/FindEigen3.cmake deleted file mode 100644 index 9c546a05..00000000 --- a/lsd_slam_core/cmake/FindEigen3.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# - Try to find Eigen3 lib -# -# This module supports requiring a minimum version, e.g. you can do -# find_package(Eigen3 3.1.2) -# to require version 3.1.2 or newer of Eigen3. -# -# Once done this will define -# -# EIGEN3_FOUND - system has eigen lib with correct version -# EIGEN3_INCLUDE_DIR - the eigen include directory -# EIGEN3_VERSION - eigen version - -# Copyright (c) 2006, 2007 Montel Laurent, -# Copyright (c) 2008, 2009 Gael Guennebaud, -# Copyright (c) 2009 Benoit Jacob -# Redistribution and use is allowed according to the terms of the 2-clause BSD license. - -if(NOT Eigen3_FIND_VERSION) - if(NOT Eigen3_FIND_VERSION_MAJOR) - set(Eigen3_FIND_VERSION_MAJOR 2) - endif(NOT Eigen3_FIND_VERSION_MAJOR) - if(NOT Eigen3_FIND_VERSION_MINOR) - set(Eigen3_FIND_VERSION_MINOR 91) - endif(NOT Eigen3_FIND_VERSION_MINOR) - if(NOT Eigen3_FIND_VERSION_PATCH) - set(Eigen3_FIND_VERSION_PATCH 0) - endif(NOT Eigen3_FIND_VERSION_PATCH) - - set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") -endif(NOT Eigen3_FIND_VERSION) - -macro(_eigen3_check_version) - file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) - - string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") - set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") - set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") - set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") - - set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) - if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - set(EIGEN3_VERSION_OK FALSE) - else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - set(EIGEN3_VERSION_OK TRUE) - endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - - if(NOT EIGEN3_VERSION_OK) - - message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " - "but at least version ${Eigen3_FIND_VERSION} is required") - endif(NOT EIGEN3_VERSION_OK) -endmacro(_eigen3_check_version) - -if (EIGEN3_INCLUDE_DIR) - - # in cache already - _eigen3_check_version() - set(EIGEN3_FOUND ${EIGEN3_VERSION_OK}) - -else (EIGEN3_INCLUDE_DIR) - - find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library - PATHS - ${CMAKE_INSTALL_PREFIX}/include - ${KDE4_INCLUDE_DIR} - PATH_SUFFIXES eigen3 eigen - ) - - if(EIGEN3_INCLUDE_DIR) - _eigen3_check_version() - endif(EIGEN3_INCLUDE_DIR) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) - - mark_as_advanced(EIGEN3_INCLUDE_DIR) - -endif(EIGEN3_INCLUDE_DIR) - diff --git a/lsd_slam_core/cmake/FindG2O.cmake b/lsd_slam_core/cmake/FindG2O.cmake new file mode 100644 index 00000000..86a6c965 --- /dev/null +++ b/lsd_slam_core/cmake/FindG2O.cmake @@ -0,0 +1,98 @@ +# Locate the g2o libraries +# A general framework for graph optimization. +# +# This module defines +# G2O_FOUND, if false, do not try to link against g2o +# G2O_LIBRARIES, path to the libg2o +# G2O_INCLUDE_DIR, where to find the g2o header files +# +# Niko Suenderhauf +# Adapted by Felix Endres +# Updated (ROS) by Jeremie Deray + +IF(UNIX) + + IF(G2O_INCLUDE_DIR AND G2O_LIBRARIES) + # in cache already + SET(G2O_FIND_QUIETLY TRUE) + ENDIF(G2O_INCLUDE_DIR AND G2O_LIBRARIES) + + MESSAGE(STATUS "Searching for g2o ...") + FIND_PATH(G2O_INCLUDE_DIR + NAMES core math_groups types + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/ + PATH_SUFFIXES include/g2o include) + + IF (G2O_INCLUDE_DIR) + MESSAGE(STATUS "Found g2o headers in: ${G2O_INCLUDE_DIR}") + ENDIF (G2O_INCLUDE_DIR) + + FIND_LIBRARY(G2O_CORE_LIB + NAMES g2o_core + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/lib + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_STUFF_LIB + NAMES g2o_stuff + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/lib + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_TYPES_SLAM3D_LIB + NAMES g2o_types_slam3d + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/lib + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_SOLVER_CHOLMOD_LIB + NAMES g2o_solver_cholmod + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/lib + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_SOLVER_PCG_LIB + NAMES g2o_solver_pcg + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/lib + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_SOLVER_CSPARSE_LIB + NAMES g2o_solver_csparse + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/lib + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_INCREMENTAL_LIB + NAMES g2o_incremental + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/lib + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_CSPARSE_EXTENSION_LIB + NAMES g2o_csparse_extension + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/lib + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_TYPE_SBA + NAMES g2o_types_sba + PATHS /usr/local /usr /opt/ros/$ENV{ROS_DISTRO}/lib + PATH_SUFFIXES lib) + + + SET(G2O_LIBRARIES ${G2O_CSPARSE_EXTENSION_LIB} + ${G2O_CORE_LIB} + ${G2O_STUFF_LIB} + ${G2O_TYPES_SLAM3D_LIB} + ${G2O_SOLVER_CHOLMOD_LIB} + ${G2O_SOLVER_PCG_LIB} + ${G2O_SOLVER_CSPARSE_LIB} + ${G2O_INCREMENTAL_LIB} + ${G2O_TYPE_SBA} + ) + +# IF(G2O_LIBRARIES AND G2O_INCLUDE_DIR) +# SET(G2O_FOUND "YES") +# IF(NOT G2O_FIND_QUIETLY) +# MESSAGE(STATUS "-- Found libg2o: ${G2O_LIBRARIES}") +# ENDIF(NOT G2O_FIND_QUIETLY) +# ELSE(G2O_LIBRARIES AND G2O_INCLUDE_DIR) +# IF(NOT G2O_LIBRARIES) +# IF(G2O_FIND_REQUIRED) +# message(-- FATAL_ERROR "Could not find libg2o!") +# ENDIF(G2O_FIND_REQUIRED) +# ENDIF(NOT G2O_LIBRARIES) +# +# IF(NOT G2O_INCLUDE_DIR) +# IF(G2O_FIND_REQUIRED) +# message(-- FATAL_ERROR "Could not find g2o include directory!") +# ENDIF(G2O_FIND_REQUIRED) +# ENDIF(NOT G2O_INCLUDE_DIR) +# ENDIF(G2O_LIBRARIES AND G2O_INCLUDE_DIR) + +ENDIF(UNIX) diff --git a/lsd_slam_core/cmake/FindSuiteParse.cmake b/lsd_slam_core/cmake/FindSuiteParse.cmake index b39eaec7..7779bea6 100644 --- a/lsd_slam_core/cmake/FindSuiteParse.cmake +++ b/lsd_slam_core/cmake/FindSuiteParse.cmake @@ -126,3 +126,4 @@ ELSE(CSPARSE_INCLUDE_DIR AND CSPARSE_LIBRARY) SET(CSPARSE_FOUND FALSE) ENDIF(CSPARSE_INCLUDE_DIR AND CSPARSE_LIBRARY) + diff --git a/lsd_slam_core/manifest.xml b/lsd_slam_core/manifest.xml deleted file mode 100644 index 8a549b60..00000000 --- a/lsd_slam_core/manifest.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - Large-Scale Direct Monocular SLAM - - - Jakob Engel - see http://vision.in.tum.de/lsdslam - - http://vision.in.tum.de/lsdslam - - - - - - - diff --git a/lsd_slam_core/package.xml b/lsd_slam_core/package.xml new file mode 100644 index 00000000..4bc245b4 --- /dev/null +++ b/lsd_slam_core/package.xml @@ -0,0 +1,35 @@ + + + lsd_slam_core + 0.0.0 + + Large-Scale Direct Monocular SLAM + + + Jakob Engel + Jakob Engel + see http://vision.in.tum.de/lsdslam + http://vision.in.tum.de/lsdslam + + catkin + cv_bridge + dynamic_reconfigure + sensor_msgs + roscpp + lsd_slam_viewer + rosbag + eigen + suitesparse + libg2o + + cv_bridge + dynamic_reconfigure + sensor_msgs + roscpp + lsd_slam_viewer + rosbag + eigen + suitesparse + libg2o + + diff --git a/lsd_slam_viewer/CMakeLists.txt b/lsd_slam_viewer/CMakeLists.txt index 25e987b3..f0c2512b 100644 --- a/lsd_slam_viewer/CMakeLists.txt +++ b/lsd_slam_viewer/CMakeLists.txt @@ -1,49 +1,55 @@ cmake_minimum_required(VERSION 2.4.6) project(lsd_slam_viewer) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) -# Set the build type. Options are: -# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage -# Debug : w/ debug symbols, w/o optimization -# Release : w/o debug symbols, w/ optimization +# Set the build type. Options are: +# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage +# Debug : w/ debug symbols, w/o optimization +# Release : w/o debug symbols, w/ optimization # RelWithDebInfo : w/ debug symbols, w/ optimization -# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries -set(ROS_BUILD_TYPE Release) - -rosbuild_init() +# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries +set(CMAKE_BUILD_TYPE Release) ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/thirdparty/Sophus) -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) -set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) +find_package(catkin REQUIRED COMPONENTS + cv_bridge + dynamic_reconfigure + sensor_msgs + roscpp + rosbag + message_generation + roslib +) + find_package(OpenGL REQUIRED) set(QT_USE_QTOPENGL TRUE) set(QT_USE_QTXML TRUE) find_package(QGLViewer REQUIRED) -find_package(Eigen3 REQUIRED) -include_directories(${QT_INCLUDES} ${EIGEN3_INCLUDE_DIR} ${QGLVIEWER_INCLUDE_DIR}) - -rosbuild_find_ros_package(dynamic_reconfigure) -include(${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake) -gencfg() - - - - - -# Messages & Services -rosbuild_genmsg() +find_package(Eigen REQUIRED) +find_package(OpenCV REQUIRED) +find_package(Boost REQUIRED COMPONENTS thread) +include_directories(${QGLVIEWER_INCLUDE_DIR} + ${catkin_INCLUDE_DIRS} + ${EIGEN_INCLUDE_DIR} + ${QT_INCLUDES} ) # SSE flags -rosbuild_check_for_sse() set(CMAKE_CXX_FLAGS - "${SSE_FLAGS}" + "${CMAKE_CXX_FLAGS} -march=native -Wall -std=c++0x" ) -# SSE Sources files +add_message_files(DIRECTORY msg FILES keyframeMsg.msg keyframeGraphMsg.msg) +generate_messages(DEPENDENCIES) + +generate_dynamic_reconfigure_options( + cfg/LSDSLAMViewerParams.cfg +) + + +# Sources files set(SOURCE_FILES src/PointCloudViewer.cpp src/KeyFrameDisplay.cpp @@ -62,12 +68,20 @@ include_directories( ${PROJECT_SOURCE_DIR}/thirdparty/Sophus ) -rosbuild_add_executable(viewer src/main_viewer.cpp ${SOURCE_FILES} ${HEADER_FILES}) - -target_link_libraries(viewer ${QGLViewer_LIBRARIES} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARY} GL glut GLU) - -rosbuild_link_boost(viewer thread) - - -rosbuild_add_executable(videoStitch src/main_stitchVideos.cpp) +add_executable(viewer src/main_viewer.cpp ${SOURCE_FILES} ${HEADER_FILES}) +target_link_libraries(viewer ${QGLViewer_LIBRARIES} + ${QGLVIEWER_LIBRARY} + ${catkin_LIBRARIES} + ${Boost_LIBRARIES} + ${QT_LIBRARIES} + GL glut GLU + ) + +#add_executable(videoStitch src/main_stitchVideos.cpp) +#target_link_libraries(viewer ${QGLViewer_LIBRARIES} +# ${QGLVIEWER_LIBRARY} +# ${catkin_LIBRARIES} +# ${QT_LIBRARIES} +# GL glut GLU +# ) diff --git a/lsd_slam_viewer/Makefile b/lsd_slam_viewer/Makefile deleted file mode 100644 index b75b928f..00000000 --- a/lsd_slam_viewer/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake.mk \ No newline at end of file diff --git a/lsd_slam_viewer/cfg/LSDSLAMViewerParams.cfg b/lsd_slam_viewer/cfg/LSDSLAMViewerParams.cfg index b74485f9..8f0ade8b 100755 --- a/lsd_slam_viewer/cfg/LSDSLAMViewerParams.cfg +++ b/lsd_slam_viewer/cfg/LSDSLAMViewerParams.cfg @@ -1,10 +1,9 @@ #! /usr/bin/env python PACKAGE='lsd_slam_viewer' -import roslib; roslib.load_manifest(PACKAGE) #from driver_base.msg import SensorLevels -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/lsd_slam_viewer/manifest.xml b/lsd_slam_viewer/manifest.xml deleted file mode 100644 index b8457b9d..00000000 --- a/lsd_slam_viewer/manifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 3D Viewer for LSD-SLAM. - - - Jakob Engel - see http://vision.in.tum.de/lsdslam - - http://vision.in.tum.de/lsdslam - - - - - - - - diff --git a/lsd_slam_viewer/package.xml b/lsd_slam_viewer/package.xml new file mode 100644 index 00000000..b411459c --- /dev/null +++ b/lsd_slam_viewer/package.xml @@ -0,0 +1,32 @@ + + lsd_slam_viewer + 0.0.0 + + + 3D Viewer for LSD-SLAM. + + + Jakob Engel + Jakob Engel + see http://vision.in.tum.de/lsdslam + http://vision.in.tum.de/lsdslam + + catkin + cv_bridge + dynamic_reconfigure + sensor_msgs + roscpp + roslib + rosbag + message_generation + + cv_bridge + dynamic_reconfigure + sensor_msgs + roscpp + roslib + rosbag + + + + diff --git a/stack.xml b/stack.xml deleted file mode 100644 index c7897894..00000000 --- a/stack.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - Large-Scale Direct Monocular SLAM - - - Maintained by Jakob Engel - see http://vision.in.tum.de/lsdslam - - http://vision.in.tum.de/lsdslam - - - From f57364ce95f4578cf58fecbc8d8ac82533d6db90 Mon Sep 17 00:00:00 2001 From: Kumar Shaurya Shankar Date: Thu, 5 Feb 2015 15:32:13 -0500 Subject: [PATCH 2/5] Modified to build with catkin --- lsd_slam_core/CMakeLists.txt | 6 +++--- lsd_slam_core/package.xml | 1 + lsd_slam_viewer/CMakeLists.txt | 1 + lsd_slam_viewer/package.xml | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lsd_slam_core/CMakeLists.txt b/lsd_slam_core/CMakeLists.txt index 7b4f8f22..770b95f2 100644 --- a/lsd_slam_core/CMakeLists.txt +++ b/lsd_slam_core/CMakeLists.txt @@ -8,7 +8,6 @@ project(lsd_slam_core) # RelWithDebInfo : w/ debug symbols, w/ optimization # MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries set(CMAKE_BUILD_TYPE Release) - find_package(catkin REQUIRED COMPONENTS cv_bridge dynamic_reconfigure @@ -16,6 +15,7 @@ find_package(catkin REQUIRED COMPONENTS image_transport roscpp rosbag + cmake_modules ) find_package(Eigen REQUIRED) @@ -42,7 +42,7 @@ generate_dynamic_reconfigure_options( catkin_package( LIBRARIES lsdslam DEPENDS Eigen SuiteSparse - CATKIN_DEPENDS libg2o + DEPENDS libg2o ) # SSE flags @@ -97,7 +97,7 @@ include_directories( # build shared library. add_library(lsdslam SHARED ${SOURCE_FILES}) -target_link_libraries(lsdslam ${FABMAP_LIB} ${G2O_LIBRARIES} ${catkin_LIBRARIES} csparse cxsparse ) +target_link_libraries(lsdslam ${FABMAP_LIB} ${G2O_LIBRARIES} ${catkin_LIBRARIES} csparse cxsparse X11) #rosbuild_link_boost(lsdslam thread) diff --git a/lsd_slam_core/package.xml b/lsd_slam_core/package.xml index 4bc245b4..e1cd4d91 100644 --- a/lsd_slam_core/package.xml +++ b/lsd_slam_core/package.xml @@ -21,6 +21,7 @@ eigen suitesparse libg2o + cmake_modules cv_bridge dynamic_reconfigure diff --git a/lsd_slam_viewer/CMakeLists.txt b/lsd_slam_viewer/CMakeLists.txt index f0c2512b..e124ba88 100644 --- a/lsd_slam_viewer/CMakeLists.txt +++ b/lsd_slam_viewer/CMakeLists.txt @@ -21,6 +21,7 @@ find_package(catkin REQUIRED COMPONENTS rosbag message_generation roslib + cmake_modules ) find_package(OpenGL REQUIRED) diff --git a/lsd_slam_viewer/package.xml b/lsd_slam_viewer/package.xml index b411459c..c02db592 100644 --- a/lsd_slam_viewer/package.xml +++ b/lsd_slam_viewer/package.xml @@ -19,7 +19,8 @@ roslib rosbag message_generation - + cmake_modules + cv_bridge dynamic_reconfigure sensor_msgs From e7dd4bcdf738a6406ae2ffed7ef19c44c592d796 Mon Sep 17 00:00:00 2001 From: Kumar Shaurya Shankar Date: Thu, 5 Feb 2015 15:55:54 -0500 Subject: [PATCH 3/5] Added the default SSE_FLAGS include in the viewer CMakeLists --- lsd_slam_viewer/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsd_slam_viewer/CMakeLists.txt b/lsd_slam_viewer/CMakeLists.txt index e124ba88..2f614b92 100644 --- a/lsd_slam_viewer/CMakeLists.txt +++ b/lsd_slam_viewer/CMakeLists.txt @@ -39,7 +39,7 @@ include_directories(${QGLVIEWER_INCLUDE_DIR} # SSE flags set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -march=native -Wall -std=c++0x" + "${CMAKE_CXX_FLAGS} ${SSE_FLAGS} -march=native -Wall -std=c++0x" ) add_message_files(DIRECTORY msg FILES keyframeMsg.msg keyframeGraphMsg.msg) From 0e8b2670a9fe658ddeffc656f1281ead0b759e61 Mon Sep 17 00:00:00 2001 From: Kumar Shaurya Shankar Date: Thu, 5 Feb 2015 15:57:36 -0500 Subject: [PATCH 4/5] Got the CMakeLists to reflect master branch c++ flags better --- lsd_slam_viewer/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsd_slam_viewer/CMakeLists.txt b/lsd_slam_viewer/CMakeLists.txt index 2f614b92..5f0accd3 100644 --- a/lsd_slam_viewer/CMakeLists.txt +++ b/lsd_slam_viewer/CMakeLists.txt @@ -39,7 +39,7 @@ include_directories(${QGLVIEWER_INCLUDE_DIR} # SSE flags set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} ${SSE_FLAGS} -march=native -Wall -std=c++0x" + "${CMAKE_CXX_FLAGS} ${SSE_FLAGS}" ) add_message_files(DIRECTORY msg FILES keyframeMsg.msg keyframeGraphMsg.msg) From 1faea38f5603a4396889a6924716979b9b3b54ab Mon Sep 17 00:00:00 2001 From: Kumar Shaurya Shankar Date: Thu, 5 Feb 2015 16:01:39 -0500 Subject: [PATCH 5/5] Copying same order of SSE flags for slam_core --- lsd_slam_core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsd_slam_core/CMakeLists.txt b/lsd_slam_core/CMakeLists.txt index acb83e29..2b3fd8ba 100644 --- a/lsd_slam_core/CMakeLists.txt +++ b/lsd_slam_core/CMakeLists.txt @@ -51,7 +51,7 @@ add_definitions("-DENABLE_SSE") # Also add some useful compiler flag set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -march=native -Wall -std=c++0x" + "${CMAKE_CXX_FLAGS} ${SSE_FLAGS} -march=native -std=c++0x" ) # Set source files