Skip to content

Commit

Permalink
first commit for comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzm0612 committed Oct 8, 2020
0 parents commit 593ec8c
Show file tree
Hide file tree
Showing 358 changed files with 75,858 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
BasedOnStyle: Chromium
AccessModifierOffset: '-4'
AlwaysBreakBeforeMultilineStrings: 'true'
BinPackArguments: 'true'
BinPackParameters: 'true'
BraceWrapping:
BeforeCatch: 'true'
BeforeElse: 'true'
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
ColumnLimit: '0'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
IncludeBlocks: Preserve
IndentPPDirectives: None
IndentWidth: '4'
SortIncludes: 'false'
SpaceAfterTemplateKeyword: 'false'
SpacesBeforeTrailingComments: '1'
Standard: Cpp11
TabWidth: '4'
UseTab: Never

...
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# hidden files and dirs
.gitignore
.git/
.idea/
.vscode/

# not needed for building OpenVSLAM
Dockerfile*
LICENSE
README.md
.travis.yml
wercker.yml
docs/
test/
viewer/

# build directory
build/
cmake-build-debug/
cmake-build-release/

# build cache
CMakeCache.txt
CMakeFiles/
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
build/
devel/
lib/
.idea/
cmake-build-debug/
cmake-build-release/
*/.python-version
*.user

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
239 changes: 239 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
language: cpp

os:
- osx
osx_image:
- xcode10

compiler:
- clang

env:
global:
- DEPS_DIR="${HOME}/deps"
- DATASET_DIR="${HOME}/dataset"

before_cache:
- brew cleanup

cache:
ccache: true
directories:
- ${HOME}/Library/Caches/Homebrew
- ${DEPS_DIR}/DBoW2
- ${DEPS_DIR}/g2o
- ${DEPS_DIR}/Pangolin
- ${DEPS_DIR}/socket.io-client-cpp
- ${DATASET_DIR}

addons:
homebrew:
update: true
packages:
- ccache
- pkg-config
- cmake
- git
- suite-sparse
- eigen
- ffmpeg
- opencv
- yaml-cpp
- glog
- gflags
- glew
- protobuf
- clang-format

before_install:
- ccache -s
- mkdir -p ${DEPS_DIR}
- |
cd ${DEPS_DIR}
if [ ! -d DBoW2 ]; then
echo "clone DBoW2"
git clone https://github.com/shinsumicco/DBoW2.git
elif [ -z "$(ls DBoW2)" ]; then
echo "reclone DBoW2"
rm -rf DBoW2
git clone https://github.com/shinsumicco/DBoW2.git
fi
cd DBoW2
mkdir -p build && cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
..
make -j 3
make install
- |
cd ${DEPS_DIR}
if [ ! -d g2o ]; then
echo "clone g2o"
git clone https://github.com/RainerKuemmerle/g2o.git
elif [ -z "$(ls g2o)" ]; then
echo "reclone g2o"
rm -rf g2o
git clone https://github.com/RainerKuemmerle/g2o.git
fi
cd g2o
mkdir -p build && cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_CXX_FLAGS=-std=c++11 \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_UNITTESTS=OFF \
-DBUILD_WITH_MARCH_NATIVE=ON \
-DG2O_BUILD_EXAMPLES=OFF \
-DG2O_BUILD_APPS=OFF \
-DG2O_USE_CHOLMOD=OFF \
-DG2O_USE_CSPARSE=ON \
-DG2O_USE_OPENGL=OFF \
-DG2O_USE_OPENMP=ON \
..
make -j 3
make install
- |
cd ${DEPS_DIR}
if [ ! -d Pangolin ]; then
echo "clone Pangolin"
git clone https://github.com/stevenlovegrove/Pangolin.git
elif [ -z "$(ls Pangolin)" ]; then
echo "reclone Pangolin"
rm -rf Pangolin
git clone https://github.com/stevenlovegrove/Pangolin.git
fi
cd Pangolin
mkdir -p build && cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_PANGOLIN_LIBOPENEXR=OFF \
..
make -j 3
make install
- |
cd ${DEPS_DIR}
if [ ! -d socket.io-client-cpp ]; then
echo "clone socket.io-client-cpp"
git clone https://github.com/shinsumicco/socket.io-client-cpp.git
elif [ -z "$(ls socket.io-client-cpp)" ]; then
echo "reclone socket.io-client-cpp"
rm -rf socket.io-client-cpp
git clone https://github.com/shinsumicco/socket.io-client-cpp.git
fi
cd socket.io-client-cpp
git submodule init
git submodule update
mkdir -p build && cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_UNIT_TESTS=OFF \
..
make -j 3
make install
install:
- |
cd ${TRAVIS_BUILD_DIR}
DIRS_TO_EXCLUDE=".git 3rd cmake docs build .idea cmake-build-debug cmake-build-release"
for DIR in ${DIRS_TO_EXCLUDE}; do
EXCLUDE_CMD="${EXCLUDE_CMD} -type d -name ${DIR} -prune -o"
done
FILES=$(find -E . ${EXCLUDE_CMD} -type f -regex ".*\.(c|h|cc|hh|cpp|hpp)" -print)
for FILE in ${FILES}; do
RET=$(diff ${FILE} <(clang-format -style=file ${FILE}) 2>&1 || true)
if [ -n "${RET}" ]; then
FILES_TO_FORMAT="${FILES_TO_FORMAT} ${FILE}"
fi
done
- |
if [ -n "${FILES_TO_FORMAT}" ]; then
echo "Please apply clang-format to following files:"
for FILE in ${FILES_TO_FORMAT}; do echo "* ${FILE}"; done
travis_terminate 1
fi
echo "There is no file which needs clang-format"
- |
cd ${TRAVIS_BUILD_DIR}
mkdir -p build && cd build
cmake \
-DBUILD_WITH_MARCH_NATIVE=ON \
-DUSE_PANGOLIN_VIEWER=ON \
-DUSE_SOCKET_PUBLISHER=OFF \
-DUSE_STACK_TRACE_LOGGER=ON \
-DBOW_FRAMEWORK=DBoW2 \
-DBUILD_TESTS=ON \
..
make -j 3
- |
cd ${TRAVIS_BUILD_DIR}
mkdir -p build && cd build
cmake \
-DBUILD_WITH_MARCH_NATIVE=ON \
-DUSE_PANGOLIN_VIEWER=OFF \
-DUSE_SOCKET_PUBLISHER=ON \
-DUSE_STACK_TRACE_LOGGER=ON \
-DBOW_FRAMEWORK=DBoW2 \
-DBUILD_TESTS=ON \
..
make -j 3
- |
cd ${TRAVIS_BUILD_DIR}
mkdir -p build && cd build
cmake \
-DBUILD_WITH_MARCH_NATIVE=ON \
-DUSE_PANGOLIN_VIEWER=OFF \
-DUSE_SOCKET_PUBLISHER=OFF \
-DUSE_STACK_TRACE_LOGGER=ON \
-DBOW_FRAMEWORK=DBoW2 \
-DBUILD_TESTS=ON \
..
make -j 3
before_script:
- mkdir -p ${DATASET_DIR}
- |
cd ${DATASET_DIR}
if [ -z "$(ls orb_vocab)" ]; then
FILE_ID="1wUPb328th8bUqhOk-i8xllt5mgRW4n84"
curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=${FILE_ID}" > /dev/null
CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
curl -sLb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=${FILE_ID}" -o orb_vocab.zip
unzip orb_vocab.zip
rm orb_vocab.zip
fi
- |
cd ${DATASET_DIR}
if [ -z "$(ls video_for_ci_1)" ]; then
FILE_ID="1TXjREzkht3iRz__qVx4oYRW1GXsv37ct"
curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=${FILE_ID}" > /dev/null
CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
curl -sLb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=${FILE_ID}" -o video_for_ci_1.zip
unzip video_for_ci_1.zip
rm video_for_ci_1.zip
fi
script:
- |
cd ${TRAVIS_BUILD_DIR}
cd build
ctest -V
- |
cd ${TRAVIS_BUILD_DIR}
cd build
./run_video_slam \
-v ${DATASET_DIR}/orb_vocab/orb_vocab.dbow2 \
-m ${DATASET_DIR}/video_for_ci_1/video.mp4 \
-c ${DATASET_DIR}/video_for_ci_1/config.yaml \
--frame-skip 3 --no-sleep --map-db map.msg --debug
- |
cd ${TRAVIS_BUILD_DIR}
cd build
./run_video_localization \
-v ${DATASET_DIR}/orb_vocab/orb_vocab.dbow2 \
-m ${DATASET_DIR}/video_for_ci_1/video.mp4 \
-c ${DATASET_DIR}/video_for_ci_1/config.yaml \
--frame-skip 3 --no-sleep --map-db map.msg --debug
21 changes: 21 additions & 0 deletions 3rd/json/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2013-2019 Niels Lohmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 593ec8c

Please sign in to comment.