Skip to content

Commit a70fcba

Browse files
committed
S-PTAM code corresponding to RAS 2017 S-PTAM publication
1 parent a99e51d commit a70fcba

File tree

154 files changed

+15253
-5225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+15253
-5225
lines changed

.gitignore

+11-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ CMakeScripts
66
Makefile
77
cmake_install.cmake
88
install_manifest.txt
9+
CMakeLists.txt.user*
10+
11+
# Documentation #
12+
#################
13+
doc/
914

1015
# Compiled source #
1116
###################
@@ -60,13 +65,18 @@ install_manifest.txt
6065
# Logs and databases #
6166
######################
6267
*.log
68+
*.dat
6369

6470
# Images #
6571
##########
66-
*.png
6772
*.pdf
6873
*.jpg
6974

75+
# Project files #
76+
##################
77+
*.prj
78+
.geanyprj
79+
7080
# Temporal files #
7181
##################
7282
*.*~

.gitlab-ci.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
before_script:
2+
- /prepare.sh
3+
- apt-get install -y python-matplotlib
4+
5+
build:
6+
stage: build
7+
tags:
8+
- ros-kinetic
9+
script:
10+
# Build ROS in four configurations
11+
- /build.sh --cmake-args -DSHOW_TRACKED_FRAMES=ON -DSHOW_PROFILING=ON
12+
- /build.sh --cmake-args -DSHOW_TRACKED_FRAMES=ON -DSHOW_PROFILING=OFF
13+
- /build.sh --cmake-args -DSHOW_TRACKED_FRAMES=OFF -DSHOW_PROFILING=ON
14+
- /build.sh --cmake-args -DSHOW_TRACKED_FRAMES=OFF -DSHOW_PROFILING=OFF
15+
# Build standalone in release config for running tests
16+
- cd $CI_PROJECT_DIR/src/standAlone && mkdir -p build && cd build &&
17+
cmake -DSHOW_TRACKED_FRAMES=OFF -DSHOW_PROFILING=ON -DCMAKE_BUILD_TYPE=Release .. && make
18+
# Run KITTI 04 in standalone mode
19+
- cd $CI_PROJECT_DIR/src/standAlone &&
20+
./build/sptam-stereo --timestamps /datasets/KITTI/04/times.txt
21+
../../configurationFiles/kitti.yaml
22+
../../configurationFiles/kitti_cam_04_to_12.yaml
23+
/datasets/KITTI/04/image_0 /datasets/KITTI/04/image_1
24+
dir
25+
# Run plot-errors to compute errors and make plots
26+
- $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
27+
artifacts:
28+
paths:
29+
- $CI_PROJECT_DIR/src/standAlone/*.log
30+
- $CI_PROJECT_DIR/src/standAlone/*.png
31+
expire_in: '1 week'
32+
33+

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "bow_voc"]
2+
path = bow_voc
3+
url = https://github.com/lrse/bow_vocabularies.git

CMakeLists.txt

+17-22
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
cmake_minimum_required(VERSION 2.8.3)
1+
cmake_minimum_required(VERSION 3.0.2)
22
project( sptam )
33

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

6-
# declare cache entry parameters
7-
SET(SHOW_TRACKED_FRAMES OFF CACHE BOOL "Enable/Disable OpenCV frame visualization for the tracker.")
8-
SET(SHOW_PROFILING ON CACHE BOOL "Enable/Disable Profiling of each step.")
9-
10-
if( SHOW_TRACKED_FRAMES )
11-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSHOW_TRACKED_FRAMES")
12-
endif()
13-
14-
if( SHOW_PROFILING )
15-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSHOW_PROFILING")
16-
endif()
6+
# include macros for program options
7+
include( options )
178

189
## Find catkin macros and libraries
1910
find_package( catkin REQUIRED COMPONENTS
@@ -27,9 +18,13 @@ find_package( catkin REQUIRED COMPONENTS
2718
image_geometry
2819
pcl_ros
2920
nav_msgs
30-
tf_conversions
21+
tf2
22+
tf2_geometry_msgs
23+
tf2_ros
3124
image_transport
25+
nodelet
3226
)
27+
include_directories(${catkin_INCLUDE_DIRS})
3328

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

4237
# Find OpenCV library
43-
find_package(OpenCV REQUIRED)
44-
45-
# Find PCL library
46-
find_package(PCL 1.7 REQUIRED)
47-
include_directories(${PCL_INCLUDE_DIRS})
48-
link_directories(${PCL_LIBRARY_DIRS})
49-
add_definitions(${PCL_DEFINITIONS})
38+
FIND_PACKAGE(OpenCV REQUIRED) # OpenCV 3
39+
#FIND_PACKAGE(OpenCV 2 REQUIRED) # OpenCV 2
40+
include_directories(${OpenCV_INCLUDE_DIRS})
5041

5142
# Find Suitesparse library
5243
find_package(SuiteSparse REQUIRED)
44+
include_directories(${CSPARSE_INCLUDE_DIR})
5345
include_directories(${CHOLMOD_INCLUDE_DIR})
5446

5547
# Find G2O Library
5648
find_package(G2O REQUIRED)
5749
# select required components
58-
SET(G2O_LIBRARIES ${G2O_CORE_LIBRARY} ${G2O_STUFF_LIBRARY} ${G2O_SOLVER_CSPARSE} ${G2O_SOLVER_CSPARSE_EXTENSION} ${G2O_TYPES_SBA})
50+
SET(G2O_LIBRARIES ${G2O_CORE_LIBRARY} ${G2O_STUFF_LIBRARY} ${G2O_SOLVER_CSPARSE} ${G2O_SOLVER_CSPARSE_EXTENSION} ${G2O_TYPES_SBA} ${G2O_TYPES_SLAM3D})
51+
include_directories(${G2O_INCLUDE_DIR})
5952

6053
###################################
6154
## catkin specific configuration ##
@@ -69,10 +62,11 @@ SET(G2O_LIBRARIES ${G2O_CORE_LIBRARY} ${G2O_STUFF_LIBRARY} ${G2O_SOLVER_CSPARSE}
6962
catkin_package(
7063
# INCLUDE_DIRS include
7164
# LIBRARIES sptam
72-
CATKIN_DEPENDS roscpp std_msgs sensor_msgs geometry_msgs cv_bridge message_filters image_geometry pcl_ros nav_msgs tf_conversions
65+
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
7366
# DEPENDS system_lib
7467
)
7568

69+
7670
###########
7771
## Build ##
7872
###########
@@ -87,6 +81,7 @@ set( SPTAM_LIBRARIES
8781
${catkin_LIBRARIES}
8882
${G2O_LIBRARIES}
8983
${SUITESPARSE_LIBRARIES}
84+
${CHOLMOD_LIBRARIES}
9085
${YamlCpp_LIBRARIES}
9186
cxsparse
9287
sptam

0 commit comments

Comments
 (0)