diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..28dd0e44d
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,57 @@
+# no xenial support from travis yet...
+dist: trusty
+sudo: enabled
+language: cpp
+cache: ccache
+
+# get c++14 compatible gcc version
+addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gcc-5
+ - g++-5
+
+# See: https://docs.travis-ci.com/user/languages/c/
+# We don't include clang builds, since there are issues
+# with C++11/14 and libc++ on Trusty, e.g. when including
+# OpenCV headers.
+matrix:
+ include:
+ - compiler: gcc
+ os: linux
+ env:
+ - BUILD_TYPE=Release
+ - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
+ - compiler: gcc
+ os: linux
+ env:
+ - BUILD_TYPE=Debug
+ - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
+ - compiler: clang
+ os: osx
+ env: BUILD_TYPE=Release
+# For now only run on xcode8.3, which is the default image, since OSX testing on Travis can take a long time.
+# osx_image: xcode8.3
+# - compiler: clang
+# os: osx
+# env: BUILD_TYPE=Release
+# osx_image: xcode7.3
+
+env:
+ global:
+ - MAKEFLAGS="-j 2"
+
+before_install:
+ - eval "${MATRIX_EVAL}"
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scripts/ci-install-linux-deps.sh ; fi
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then scripts/ci-install-osx-deps.sh ; fi
+
+script:
+ - mkdir build
+ - cd build
+ - cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
+ - make
+ - sudo make install
+# - make test
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0f137ecb1..5404ffe5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,35 +4,62 @@ PROJECT(${PROJECT_NAME})
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
#set(CMAKE_VERBOSE_MAKEFILE ON)
-
-set(BUILD_TYPE Release)
-#set(BUILD_TYPE RelWithDebInfo)
+# TODO: make this work like a catkin package if it is built with
+# catkin, otherwise plain cmake; change package.xml to catkin; check
+# realsense_camera or librealsense for an example
+
+# Set default build type if not specified otherwise.
+# See https://cmake.org/pipermail/cmake/2012-May/050243.html
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
+ message(STATUS "Setting build type to '${CMAKE_BUILD_TYPE}' as none was specified.")
+ # Set the possible values of build type for cmake-gui
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
+ "MinSizeRel" "RelWithDebInfo")
+endif()
set(EXECUTABLE_OUTPUT_PATH bin)
set(LIBRARY_OUTPUT_PATH lib)
+set(INCLUDE_OUTPUT_PATH include/dso)
+set(CMAKE_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH}/cmake/dso)
+set(PKGCONFIG_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH}/pkgconfig)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+# avoid cmake policy warning by adopting new default
+if(APPLE)
+ set(CMAKE_MACOSX_RPATH ON)
+endif()
+
# required libraries
-find_package(SuiteParse REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(Boost COMPONENTS system thread)
# optional libraries
find_package(LibZip QUIET)
+
+# TODO: make sure this works in general with catkin_tools, not just because of cmake package caching (~/.cmake/packages/Pangolin)
find_package(Pangolin 0.2 QUIET)
find_package(OpenCV QUIET)
# flags
-add_definitions("-DENABLE_SSE")
set(CMAKE_CXX_FLAGS
- "${SSE_FLAGS} -O3 -g -std=c++0x -march=native"
-# "${SSE_FLAGS} -O3 -g -std=c++0x -fno-omit-frame-pointer"
+ "-std=c++14 -march=native ${CMAKE_CXX_FLAGS}"
+# "-O3 -g -fno-omit-frame-pointer"
)
+#message(" CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
+
+# Note that with a static library, it seems you might get (slightly) better runtime performence.
+option(DSO_BUILD_STATIC_LIBRARY "Build a static dso library, instead of shared" OFF)
+
if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
endif (MSVC)
+if(NOT WIN32)
+ option(DSO_BUILD_PKGCONFIG "Build pkg-config .pc file for DSO" ON)
+endif(NOT WIN32)
+
# Sources files
set(dso_SOURCE_FILES
${PROJECT_SOURCE_DIR}/src/FullSystem/FullSystem.cpp
@@ -55,7 +82,7 @@ set(dso_SOURCE_FILES
${PROJECT_SOURCE_DIR}/src/util/globalCalib.cpp
)
-
+set(DSO_BOOST_LIBRARIES ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY})
include_directories(
${PROJECT_SOURCE_DIR}/src
@@ -109,24 +136,86 @@ endif()
# compile main library.
-include_directories( ${CSPARSE_INCLUDE_DIR} ${CHOLMOD_INCLUDE_DIR})
-add_library(dso ${dso_SOURCE_FILES} ${dso_opencv_SOURCE_FILES} ${dso_pangolin_SOURCE_FILES})
-
-#set_property( TARGET dso APPEND_STRING PROPERTY COMPILE_FLAGS -Wall )
-
-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # OSX
- set(BOOST_THREAD_LIBRARY boost_thread-mt)
+if (DSO_BUILD_STATIC_LIBRARY)
+ message("--- dso static library selected.")
+ add_library(dso ${dso_SOURCE_FILES} ${dso_opencv_SOURCE_FILES} ${dso_pangolin_SOURCE_FILES})
+ install (TARGETS dso ARCHIVE DESTINATION ${LIBRARY_OUTPUT_PATH} COMPONENT libraries)
else()
- set(BOOST_THREAD_LIBRARY boost_thread)
+ message("--- dso dynamic library selected.")
+ add_library(dso SHARED ${dso_SOURCE_FILES} ${dso_opencv_SOURCE_FILES} ${dso_pangolin_SOURCE_FILES})
+ target_link_libraries(dso ${DSO_BOOST_LIBRARIES})
+ if (HAS_ZIPLIB)
+ target_link_libraries(dso ${LIBZIP_LIBRARY})
+ endif()
+ if (HAS_PANGOLIN)
+ target_link_libraries(dso ${Pangolin_LIBRARIES})
+ endif()
+ if (HAS_OPENCV)
+ target_link_libraries(dso ${OpenCV_LIBS})
+ endif()
+ install (TARGETS dso LIBRARY DESTINATION ${LIBRARY_OUTPUT_PATH} COMPONENT libraries)
endif()
+#set_property( TARGET dso APPEND_STRING PROPERTY COMPILE_FLAGS -Wall )
# build main executable (only if we have both OpenCV and Pangolin)
if (OpenCV_FOUND AND Pangolin_FOUND)
message("--- compiling dso_dataset.")
add_executable(dso_dataset ${PROJECT_SOURCE_DIR}/src/main_dso_pangolin.cpp )
- target_link_libraries(dso_dataset dso boost_system cxsparse ${BOOST_THREAD_LIBRARY} ${LIBZIP_LIBRARY} ${Pangolin_LIBRARIES} ${OpenCV_LIBS})
+ target_link_libraries(dso_dataset dso ${DSO_BOOST_LIBRARIES} ${LIBZIP_LIBRARY} ${Pangolin_LIBRARIES} ${OpenCV_LIBS})
+ install (TARGETS dso_dataset RUNTIME DESTINATION ${EXECUTABLE_OUTPUT_PATH})
else()
message("--- not building dso_dataset, since either don't have openCV or Pangolin.")
endif()
+# install all header files
+install(DIRECTORY src/ DESTINATION ${INCLUDE_OUTPUT_PATH}
+ FILES_MATCHING PATTERN "*.h")
+
+#DSO comes with its own version of Sophus (TODO try to get the library from https://github.com/strasdat/Sophus)
+install(DIRECTORY thirdparty/Sophus/sophus DESTINATION ${INCLUDE_OUTPUT_PATH}
+ FILES_MATCHING PATTERN "*.hpp")
+
+
+macro(libraries_for_pkgconfig VARNAME)
+ foreach(__lib ${ARGN})
+ string(STRIP __lib ${__lib})
+ string(SUBSTRING ${__lib} 0 1 __lib_is_absolute)
+ if (__lib_is_absolute STREQUAL "/")
+ get_filename_component(__lib_path ${__lib} PATH)
+ get_filename_component(__lib_name ${__lib} NAME_WE)
+ string(REGEX REPLACE "^lib" "" __lib_name "${__lib_name}")
+ set(${VARNAME} "${${VARNAME}} -L${__lib_path} -l${__lib_name}")
+ else()
+ set(${VARNAME} "${${VARNAME}} ${__lib}")
+ endif()
+ endforeach()
+endmacro()
+
+# Generate pkgconfig pc file
+if(DSO_BUILD_PKGCONFIG)
+ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/dso.pc.in)
+ message("-- Found: ${CMAKE_CURRENT_SOURCE_DIR}/dso.pc.in")
+
+ # Set the target name
+ set(TARGET_NAME dso)
+
+ # Dependency for DSO
+ libraries_for_pkgconfig(${TARGET_NAME}_PKGCONFIG_LIBS
+ ${DSO_BOOST_LIBRARIES} ${LIBZIP_LIBRARY} ${Pangolin_LIBRARIES}
+ ${OpenCV_LIBS})
+
+ set(${TARGET_NAME}_PKGCONFIG_CFLAGS "${${TARGET_NAME}_PKGCONFIG_CFLAGS} ${BOOST_CFLAGS_OTHER}")
+
+ set(PKGCONFIG_REQUIRES eigen3)
+ set(PKGCONFIG_CFLAGS ${${TARGET_NAME}_PKGCONFIG_CFLAGS})
+ set(PKGCONFIG_LIBS ${${TARGET_NAME}_PKGCONFIG_LIBS})
+
+ configure_file(dso.pc.in dso.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dso.pc DESTINATION ${PKGCONFIG_OUTPUT_PATH})
+ else()
+ message("-- pkg-config: ${CMAKE_CURRENT_SOURCE_DIR}/dso.pc.in is not available for configuration")
+ endif()
+
+endif(DSO_BUILD_PKGCONFIG)
+
diff --git a/README.md b/README.md
index 2ddc54bae..3a1bd6518 100644
--- a/README.md
+++ b/README.md
@@ -15,12 +15,14 @@ Get some datasets from [https://vision.in.tum.de/mono-dataset](https://vision.in
#### 2.1 Required Dependencies
-##### suitesparse and eigen3 (required).
-Required. Install with
-
- sudo apt-get install libsuitesparse-dev libeigen3-dev libboost-all-dev
+The following instructions are tested on Ubuntu 16.04. Ubuntu 14.04
+should also work. Other platforms might work with minor adjustments.
+For Mac OS X, see below.
+##### eigen3 and boost (required).
+Required. Install with
+ sudo apt-get install libeigen3-dev libboost-all-dev
#### 2.2 Optional Dependencies
@@ -52,6 +54,12 @@ Used to read datasets with images as .zip, as e.g. in the TUM monoVO dataset.
You can compile without this, however then you can only read images directly (i.e., have
to unzip the dataset image archives before loading them).
+On Ubuntu 16.04 and up, the version from apt should suffice:
+
+ sudo apt-get install libzip-dev
+
+On Ubuntu 14.04, you need to compile it manually:
+
sudo apt-get install zlib1g-dev
cd dso/thirdparty
tar -zxvf libzip-1.1.1.tar.gz
@@ -64,6 +72,16 @@ to unzip the dataset image archives before loading them).
##### sse2neon (required for ARM builds).
After cloning, just run `git submodule update --init` to include this. It translates Intel-native SSE functions to ARM-native NEON functions during the compilation process.
+##### Mac OS X
+
+You can install the dependencies with Homebrew.
+
+ brew install cmake pkgconfig boost eigen glew opencv libzip
+
+The install and build
+[Pangolin](https://github.com/stevenlovegrove/Pangolin.git) as above,
+and proceed below.
+
#### 2.3 Build
cd dso
@@ -72,9 +90,10 @@ After cloning, just run `git submodule update --init` to include this. It trans
cmake ..
make -j
-this will compile a library `libdso.a`, which can be linked from external projects.
+this will by default compile a dynamic library `libdso.so`, which can be linked from external projects.
It will also build a binary `dso_dataset`, to run DSO on datasets. However, for this
-OpenCV and Pangolin need to be installed.
+OpenCV and Pangolin need to be installed. You can switch to building a static library with `cmake -DDSO_BUILD_STATIC_LIBRARY=ON`.
+Note that with a static library, it seems you might get (slightly) better runtime performance.
@@ -172,6 +191,9 @@ contains the integral over (0.5,0.5) to (1.5,1.5), or the integral over (1,1) to
the given calibration in the calibration file uses the latter convention, and thus applies the -0.5 correction.
Note that this also is taken into account when creating the scale-pyramid (see `globalCalib.cpp`).
+It seems that Kalibr and OpenCV have the same internal representation as DSO, thus you should add an +0.5 offset to the
+calibration results from those, to cancel out the -0.5 correction that DSO does when loading the calibration files.
+See also [this discussion](https://github.com/ethz-asl/kalibr/issues/115) in the Kalibr issue tracker.
**Rectification modes:**
For image rectification, DSO either supports rectification to a user-defined pinhole model (`fx fy cx cy 0`),
diff --git a/dso.pc.in b/dso.pc.in
new file mode 100644
index 000000000..e83c204b3
--- /dev/null
+++ b/dso.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${prefix}/@LIBRARY_OUTPUT_PATH@
+includedir=${prefix}/@INCLUDE_OUTPUT_PATH@
+
+Name: @TARGET_NAME@
+Description: @TARGET_NAME@
+Version: @DSO_VERSION_STRING@
+Requires: @PKGCONFIG_REQUIRES@
+Libs: -L${libdir} -l@TARGET_NAME@ @PKGCONFIG_LIBS@
+Cflags: -I${includedir} @PKGCONFIG_CFLAGS@
diff --git a/package.xml b/package.xml
new file mode 100644
index 000000000..7d953e61f
--- /dev/null
+++ b/package.xml
@@ -0,0 +1,24 @@
+
+
+ dso
+ 1.0.0
+ Direct Sparse Visual Odometry
+ Nikolaus Demmel
+ Jakob Engel
+ Jakob Engel
+ GPLv3
+ http://vision.in.tum.de/dso
+ cmake
+ eigen
+ pangolin
+ suitesparse
+ boost
+ libopencv-dev
+ zlib
+
+ cmake
+
+
+
+
+
diff --git a/scripts/ci-install-linux-deps.sh b/scripts/ci-install-linux-deps.sh
new file mode 100755
index 000000000..3f3fb9151
--- /dev/null
+++ b/scripts/ci-install-linux-deps.sh
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+
+# Script to install dependencies, intended for CI builds, in particular for Travis
+
+set -x # echo on
+set -e # exit on error
+
+ROOT_DIR="$PWD"
+
+sudo apt-get update -qq
+
+# basic dependencies (needed in minimalistic docker containers, but not travis)
+#sudo apt-get install -qq build-essential git cmake wget pkg-config
+
+# get more recent cmake for e.g. CMAKE_CXX_COMPILER_LAUNCHER
+cd "$ROOT_DIR"
+wget https://cmake.org/files/v3.9/cmake-3.9.0-Linux-x86_64.sh
+chmod +x cmake-3.9.0-Linux-x86_64.sh
+set +x # echo off
+sudo ./cmake-3.9.0-Linux-x86_64.sh --skip-license --prefix=/usr/local
+set -x # echo on
+sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force
+cmake --version
+
+# get recent libeigen, since the one on 14.04 gives lots of warnings
+cd "$ROOT_DIR"
+wget http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz
+tar -xf 3.3.4.tar.gz
+cd eigen-eigen-*
+mkdir build
+cd build/
+cmake ..
+sudo make install -j1
+
+# install pangolin from source
+cd "$ROOT_DIR"
+# skip libeigen3-dev, since we installed manually above
+sudo apt-get install -qq libglew-dev libc++-dev
+git clone https://github.com/stevenlovegrove/Pangolin.git
+mkdir Pangolin/build
+cd Pangolin/build
+cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
+make
+
+# deps for DSO
+# skip libeigen3-dev, since we installed manually above
+sudo apt-get install -qq libboost-all-dev libopencv-dev
+
+# install libzip (for Ubuntu 16.04 and up, libzip-dev should be ok)
+cd "$ROOT_DIR"
+sudo apt-get install -qq zlib1g-dev
+cd thirdparty
+tar -zxvf libzip-1.1.1.tar.gz
+cd libzip-1.1.1/
+./configure
+make
+sudo make install
+sudo cp lib/zipconf.h /usr/local/include/zipconf.h # (no idea why that is needed).
diff --git a/scripts/ci-install-osx-deps.sh b/scripts/ci-install-osx-deps.sh
new file mode 100755
index 000000000..ba43e97e1
--- /dev/null
+++ b/scripts/ci-install-osx-deps.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+# Script to install dependencies, intended for CI builds, in particular for Travis
+
+set -x # echo on
+set -e # exit on error
+
+brew update
+
+# The following are already present in the travis image.
+# We can probably live with slightly outdated formulas, so skip the upgrade
+# which takes very long (in particular boost).
+#brew upgrade cmake pkgconfig boost
+
+# remove numpy, which is present in the travis image.
+# It will be installed from brew as opencv dependency, which fails if already present.
+PIP=`which pip` || PIP=pip2 # newer osx travis images don't have pip executable
+/usr/bin/yes | $PIP uninstall numpy > /dev/null # 2>&1
+
+brew install eigen glew opencv libzip
+
+brew install ccache
+export PATH="/usr/local/opt/ccache/libexec:$PATH"
+whereis ccache
+
+git clone https://github.com/stevenlovegrove/Pangolin.git
+mkdir Pangolin/build
+cd Pangolin/build/
+cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
+make
+make install -j1
+
diff --git a/src/FullSystem/CoarseTracker.cpp b/src/FullSystem/CoarseTracker.cpp
index e56662586..0f5afbfe9 100644
--- a/src/FullSystem/CoarseTracker.cpp
+++ b/src/FullSystem/CoarseTracker.cpp
@@ -699,14 +699,14 @@ bool CoarseTracker::trackNewestCoarse(
aff_g2l_out = aff_g2l_current;
- if((setting_affineOptModeA != 0 && (fabsf(aff_g2l_out.a) > 1.2))
- || (setting_affineOptModeB != 0 && (fabsf(aff_g2l_out.b) > 200)))
+ if((setting_affineOptModeA != 0 && (fabsf((float)aff_g2l_out.a) > 1.2f))
+ || (setting_affineOptModeB != 0 && (fabsf((float)aff_g2l_out.b) > 200.f)))
return false;
Vec2f relAff = AffLight::fromToVecExposure(lastRef->ab_exposure, newFrame->ab_exposure, lastRef_aff_g2l, aff_g2l_out).cast();
- if((setting_affineOptModeA == 0 && (fabsf(logf((float)relAff[0])) > 1.5))
- || (setting_affineOptModeB == 0 && (fabsf((float)relAff[1]) > 200)))
+ if((setting_affineOptModeA == 0 && (fabsf(logf((float)relAff[0])) > 1.5f))
+ || (setting_affineOptModeB == 0 && (fabsf((float)relAff[1]) > 200.f)))
return false;
diff --git a/src/FullSystem/HessianBlocks.cpp b/src/FullSystem/HessianBlocks.cpp
index ef801b7ad..87c174d55 100644
--- a/src/FullSystem/HessianBlocks.cpp
+++ b/src/FullSystem/HessianBlocks.cpp
@@ -81,8 +81,8 @@ void FrameHessian::setStateZero(const Vec10 &state_zero)
for(int i=0;i<6;i++)
{
Vec6 eps; eps.setZero(); eps[i] = 1e-3;
- SE3 EepsP = Sophus::SE3::exp(eps);
- SE3 EepsM = Sophus::SE3::exp(-eps);
+ SE3 EepsP = SE3::exp(eps);
+ SE3 EepsM = SE3::exp(-eps);
SE3 w2c_leftEps_P_x0 = (get_worldToCam_evalPT() * EepsP) * get_worldToCam_evalPT().inverse();
SE3 w2c_leftEps_M_x0 = (get_worldToCam_evalPT() * EepsM) * get_worldToCam_evalPT().inverse();
nullspaces_pose.col(i) = (w2c_leftEps_P_x0.log() - w2c_leftEps_M_x0.log())/(2e-3);
diff --git a/src/IOWrapper/Output3DWrapper.h b/src/IOWrapper/Output3DWrapper.h
index d3ddf1531..897ab3ad1 100644
--- a/src/IOWrapper/Output3DWrapper.h
+++ b/src/IOWrapper/Output3DWrapper.h
@@ -127,7 +127,7 @@ class Output3DWrapper
* Calling:
* Always called, no overhead if not used.
*/
- virtual void publishGraph(const std::map, Eigen::aligned_allocator > > &connectivity) {}
+ virtual void publishGraph(const std::map, Eigen::aligned_allocator > > &connectivity) {}
diff --git a/src/IOWrapper/OutputWrapper/SampleOutputWrapper.h b/src/IOWrapper/OutputWrapper/SampleOutputWrapper.h
index 2d2e2415b..d7d1b1ab3 100644
--- a/src/IOWrapper/OutputWrapper/SampleOutputWrapper.h
+++ b/src/IOWrapper/OutputWrapper/SampleOutputWrapper.h
@@ -56,7 +56,7 @@ class SampleOutputWrapper : public Output3DWrapper
printf("OUT: Destroyed SampleOutputWrapper\n");
}
- virtual void publishGraph(const std::map &connectivity)
+ virtual void publishGraph(const std::map, Eigen::aligned_allocator>> &connectivity) override
{
printf("OUT: got graph with %d edges\n", (int)connectivity.size());
@@ -74,7 +74,7 @@ class SampleOutputWrapper : public Output3DWrapper
- virtual void publishKeyframes( std::vector &frames, bool final, CalibHessian* HCalib)
+ virtual void publishKeyframes( std::vector &frames, bool final, CalibHessian* HCalib) override
{
for(FrameHessian* f : frames)
{
@@ -98,7 +98,7 @@ class SampleOutputWrapper : public Output3DWrapper
}
}
- virtual void publishCamPose(FrameShell* frame, CalibHessian* HCalib)
+ virtual void publishCamPose(FrameShell* frame, CalibHessian* HCalib) override
{
printf("OUT: Current Frame %d (time %f, internal ID %d). CameraToWorld:\n",
frame->incoming_id,
@@ -108,21 +108,21 @@ class SampleOutputWrapper : public Output3DWrapper
}
- virtual void pushLiveFrame(FrameHessian* image)
+ virtual void pushLiveFrame(FrameHessian* image) override
{
// can be used to get the raw image / intensity pyramid.
}
- virtual void pushDepthImage(MinimalImageB3* image)
+ virtual void pushDepthImage(MinimalImageB3* image) override
{
// can be used to get the raw image with depth overlay.
}
- virtual bool needPushDepthImage()
+ virtual bool needPushDepthImage() override
{
return false;
}
- virtual void pushDepthImageFloat(MinimalImageF* image, FrameHessian* KF )
+ virtual void pushDepthImageFloat(MinimalImageF* image, FrameHessian* KF ) override
{
printf("OUT: Predicted depth for KF %d (id %d, time %f, internal frame-ID %d). CameraToWorld:\n",
KF->frameID,
diff --git a/src/IOWrapper/Pangolin/PangolinDSOViewer.cpp b/src/IOWrapper/Pangolin/PangolinDSOViewer.cpp
index a2fdc6009..b97aa7861 100644
--- a/src/IOWrapper/Pangolin/PangolinDSOViewer.cpp
+++ b/src/IOWrapper/Pangolin/PangolinDSOViewer.cpp
@@ -419,7 +419,7 @@ void PangolinDSOViewer::drawConstraints()
-void PangolinDSOViewer::publishGraph(const std::map &connectivity)
+void PangolinDSOViewer::publishGraph(const std::map, Eigen::aligned_allocator>> &connectivity)
{
if(!setting_render_display3D) return;
if(disableAllDisplay) return;
diff --git a/src/IOWrapper/Pangolin/PangolinDSOViewer.h b/src/IOWrapper/Pangolin/PangolinDSOViewer.h
index c87936231..c10e7a2e7 100644
--- a/src/IOWrapper/Pangolin/PangolinDSOViewer.h
+++ b/src/IOWrapper/Pangolin/PangolinDSOViewer.h
@@ -67,18 +67,18 @@ class PangolinDSOViewer : public Output3DWrapper
// ==================== Output3DWrapper Functionality ======================
- virtual void publishGraph(const std::map &connectivity);
- virtual void publishKeyframes( std::vector &frames, bool final, CalibHessian* HCalib);
- virtual void publishCamPose(FrameShell* frame, CalibHessian* HCalib);
+ virtual void publishGraph(const std::map, Eigen::aligned_allocator>> &connectivity) override;
+ virtual void publishKeyframes( std::vector &frames, bool final, CalibHessian* HCalib) override;
+ virtual void publishCamPose(FrameShell* frame, CalibHessian* HCalib) override;
- virtual void pushLiveFrame(FrameHessian* image);
- virtual void pushDepthImage(MinimalImageB3* image);
- virtual bool needPushDepthImage();
+ virtual void pushLiveFrame(FrameHessian* image) override;
+ virtual void pushDepthImage(MinimalImageB3* image) override;
+ virtual bool needPushDepthImage() override;
- virtual void join();
+ virtual void join() override;
- virtual void reset();
+ virtual void reset() override;
private:
bool needReset;
diff --git a/src/OptimizationBackend/EnergyFunctional.h b/src/OptimizationBackend/EnergyFunctional.h
index 16d8bb920..93e463089 100644
--- a/src/OptimizationBackend/EnergyFunctional.h
+++ b/src/OptimizationBackend/EnergyFunctional.h
@@ -117,7 +117,7 @@ class EnergyFunctional {
std::map,
- Eigen::aligned_allocator>
+ Eigen::aligned_allocator>
> connectivityMap;
private:
diff --git a/thirdparty/Sophus/sophus/rxso3.hpp b/thirdparty/Sophus/sophus/rxso3.hpp
index a0262a090..76f4688d5 100644
--- a/thirdparty/Sophus/sophus/rxso3.hpp
+++ b/thirdparty/Sophus/sophus/rxso3.hpp
@@ -21,7 +21,7 @@
// IN THE SOFTWARE.
#ifndef SOPHUS_RXSO3_HPP
-#define RXSO3_HPP
+#define SOPHUS_RXSO3_HPP
#include "sophus.hpp"
#include "so3.hpp"
@@ -377,7 +377,7 @@ class RxSO3GroupBase {
const Adjoint d_lieBracketab_by_d_a(const Tangent & b) {
Adjoint res;
res.setZero();
- res.template topLeftCorner<3,3>() = -SO3::hat(b.template head<3>());
+ res.template topLeftCorner<3,3>() = -SO3Group::hat(b.template head<3>());
return res;
}
diff --git a/thirdparty/Sophus/sophus/sim3.hpp b/thirdparty/Sophus/sophus/sim3.hpp
index 97087c330..72d431fd3 100644
--- a/thirdparty/Sophus/sophus/sim3.hpp
+++ b/thirdparty/Sophus/sophus/sim3.hpp
@@ -390,10 +390,10 @@ class Sim3GroupBase {
Adjoint res;
res.setZero();
res.template topLeftCorner<3,3>()
- = -SO3::hat(omega2)-sigma2*Matrix3d::Identity();
- res.template block<3,3>(0,3) = -SO3::hat(upsilon2);
+ = -SO3Group::hat(omega2)-sigma2*Matrix3d::Identity();
+ res.template block<3,3>(0,3) = -SO3Group::hat(upsilon2);
res.template topRightCorner<3,1>() = upsilon2;
- res.template block<3,3>(3,3) = -SO3::hat(omega2);
+ res.template block<3,3>(3,3) = -SO3Group::hat(omega2);
return res;
}
diff --git a/thirdparty/Sophus/sophus/so3.hpp b/thirdparty/Sophus/sophus/so3.hpp
index 88a362e41..df851804c 100644
--- a/thirdparty/Sophus/sophus/so3.hpp
+++ b/thirdparty/Sophus/sophus/so3.hpp
@@ -798,7 +798,7 @@ class Map, _Options>
* No direct write access is given to ensure the quaternion stays normalized.
*/
EIGEN_STRONG_INLINE
- const ConstQuaternionReference unit_quaternion() const {
+ ConstQuaternionReference unit_quaternion() const {
return unit_quaternion_;
}