Skip to content

Commit

Permalink
S-PTAM code corresponding to RAS 2017 S-PTAM publication
Browse files Browse the repository at this point in the history
  • Loading branch information
taihup committed Sep 20, 2017
1 parent a99e51d commit a70fcba
Show file tree
Hide file tree
Showing 154 changed files with 15,253 additions and 5,225 deletions.
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ CMakeScripts
Makefile
cmake_install.cmake
install_manifest.txt
CMakeLists.txt.user*

# Documentation #
#################
doc/

# Compiled source #
###################
Expand Down Expand Up @@ -60,13 +65,18 @@ install_manifest.txt
# Logs and databases #
######################
*.log
*.dat

# Images #
##########
*.png
*.pdf
*.jpg

# Project files #
##################
*.prj
.geanyprj

# Temporal files #
##################
*.*~
Expand Down
33 changes: 33 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
before_script:
- /prepare.sh
- apt-get install -y python-matplotlib

build:
stage: build
tags:
- ros-kinetic
script:
# Build ROS in four configurations
- /build.sh --cmake-args -DSHOW_TRACKED_FRAMES=ON -DSHOW_PROFILING=ON
- /build.sh --cmake-args -DSHOW_TRACKED_FRAMES=ON -DSHOW_PROFILING=OFF
- /build.sh --cmake-args -DSHOW_TRACKED_FRAMES=OFF -DSHOW_PROFILING=ON
- /build.sh --cmake-args -DSHOW_TRACKED_FRAMES=OFF -DSHOW_PROFILING=OFF
# Build standalone in release config for running tests
- cd $CI_PROJECT_DIR/src/standAlone && mkdir -p build && cd build &&
cmake -DSHOW_TRACKED_FRAMES=OFF -DSHOW_PROFILING=ON -DCMAKE_BUILD_TYPE=Release .. && make
# Run KITTI 04 in standalone mode
- cd $CI_PROJECT_DIR/src/standAlone &&
./build/sptam-stereo --timestamps /datasets/KITTI/04/times.txt
../../configurationFiles/kitti.yaml
../../configurationFiles/kitti_cam_04_to_12.yaml
/datasets/KITTI/04/image_0 /datasets/KITTI/04/image_1
dir
# Run plot-errors to compute errors and make plots
- $CI_PROJECT_DIR/plotters/plot-errors.py --savetofiles --kitti /datasets/KITTI/poses/04.txt $CI_PROJECT_DIR/src/standAlone/*.log > $CI_PROJECT_DIR/src/standAlone/errors.log
artifacts:
paths:
- $CI_PROJECT_DIR/src/standAlone/*.log
- $CI_PROJECT_DIR/src/standAlone/*.png
expire_in: '1 week'


3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "bow_voc"]
path = bow_voc
url = https://github.com/lrse/bow_vocabularies.git
39 changes: 17 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.0.2)
project( sptam )

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules)

# declare cache entry parameters
SET(SHOW_TRACKED_FRAMES OFF CACHE BOOL "Enable/Disable OpenCV frame visualization for the tracker.")
SET(SHOW_PROFILING ON CACHE BOOL "Enable/Disable Profiling of each step.")

if( SHOW_TRACKED_FRAMES )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSHOW_TRACKED_FRAMES")
endif()

if( SHOW_PROFILING )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSHOW_PROFILING")
endif()
# include macros for program options
include( options )

## Find catkin macros and libraries
find_package( catkin REQUIRED COMPONENTS
Expand All @@ -27,9 +18,13 @@ find_package( catkin REQUIRED COMPONENTS
image_geometry
pcl_ros
nav_msgs
tf_conversions
tf2
tf2_geometry_msgs
tf2_ros
image_transport
nodelet
)
include_directories(${catkin_INCLUDE_DIRS})

# Find Boost Library
find_package(Boost COMPONENTS thread system regex REQUIRED)
Expand All @@ -40,22 +35,20 @@ find_package(PkgConfig)
pkg_check_modules(YamlCpp yaml-cpp)

# Find OpenCV library
find_package(OpenCV REQUIRED)

# Find PCL library
find_package(PCL 1.7 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
FIND_PACKAGE(OpenCV REQUIRED) # OpenCV 3
#FIND_PACKAGE(OpenCV 2 REQUIRED) # OpenCV 2
include_directories(${OpenCV_INCLUDE_DIRS})

# Find Suitesparse library
find_package(SuiteSparse REQUIRED)
include_directories(${CSPARSE_INCLUDE_DIR})
include_directories(${CHOLMOD_INCLUDE_DIR})

# Find G2O Library
find_package(G2O REQUIRED)
# select required components
SET(G2O_LIBRARIES ${G2O_CORE_LIBRARY} ${G2O_STUFF_LIBRARY} ${G2O_SOLVER_CSPARSE} ${G2O_SOLVER_CSPARSE_EXTENSION} ${G2O_TYPES_SBA})
SET(G2O_LIBRARIES ${G2O_CORE_LIBRARY} ${G2O_STUFF_LIBRARY} ${G2O_SOLVER_CSPARSE} ${G2O_SOLVER_CSPARSE_EXTENSION} ${G2O_TYPES_SBA} ${G2O_TYPES_SLAM3D})
include_directories(${G2O_INCLUDE_DIR})

###################################
## catkin specific configuration ##
Expand All @@ -69,10 +62,11 @@ SET(G2O_LIBRARIES ${G2O_CORE_LIBRARY} ${G2O_STUFF_LIBRARY} ${G2O_SOLVER_CSPARSE}
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES sptam
CATKIN_DEPENDS roscpp std_msgs sensor_msgs geometry_msgs cv_bridge message_filters image_geometry pcl_ros nav_msgs tf_conversions
CATKIN_DEPENDS roscpp std_msgs sensor_msgs geometry_msgs cv_bridge message_filters image_geometry pcl_ros nav_msgs tf2 tf2_geometry_msgs tf2_ros nodelet
# DEPENDS system_lib
)


###########
## Build ##
###########
Expand All @@ -87,6 +81,7 @@ set( SPTAM_LIBRARIES
${catkin_LIBRARIES}
${G2O_LIBRARIES}
${SUITESPARSE_LIBRARIES}
${CHOLMOD_LIBRARIES}
${YamlCpp_LIBRARIES}
cxsparse
sptam
Expand Down
Loading

0 comments on commit a70fcba

Please sign in to comment.