Compare commits

..
Author SHA1 Message Date
matlabbe 85112c2cdf add pull request template 2024-03-16 21:45:05 -07:00
matlabbe 8657e18bda update config 2024-03-16 21:27:50 -07:00
matlabbe 578bf0ed8f Try with pre-commit default usage 2024-03-16 21:06:00 -07:00
matlabbe 9f230f5b28 Adding pre-commit checks 2024-03-16 20:26:56 -07:00
10 changed files with 103 additions and 17 deletions
+7
View File
@@ -0,0 +1,7 @@
## Description
Please include a summary of the change and which issue is fixed (if any).
## Checklist:
- [ ] Did `pre-commit run --all-files` locally to fix any pre-commit failures on CI.
+16
View File
@@ -0,0 +1,16 @@
name: pre-commit
on:
pull_request:
branches:
- '**'
push:
branches: [master]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
+31
View File
@@ -0,0 +1,31 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: '^build/|^data/|^app/|^archive/|^cmake_modules/|^\..*'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.10
hooks:
- id: cmake-format
- id: cmake-lint
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfilelint
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.1
hooks:
- id: clang-format
args: ["-style=Google", "-i"]
+7 -7
View File
@@ -1,5 +1,5 @@
# Top-Level CmakeLists.txt
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.10)
PROJECT( RTABMap )
SET(PROJECT_PREFIX rtabmap)
@@ -252,10 +252,10 @@ endif()
FIND_PACKAGE(ZLIB REQUIRED QUIET)
FIND_PACKAGE(SQLite3 QUIET)
IF(SQLite3_FOUND)
MESSAGE(STATUS "Found SQLite3: ${SQLite3_INCLUDE_DIRS} ${SQLite3_LIBRARIES}")
ENDIF(SQLite3_FOUND)
FIND_PACKAGE(Sqlite3 QUIET)
IF(Sqlite3_FOUND)
MESSAGE(STATUS "Found Sqlite3: ${Sqlite3_INCLUDE_DIRS} ${Sqlite3_LIBRARIES}")
ENDIF(Sqlite3_FOUND)
if(NOT "${PCL_LIBRARIES}" STREQUAL "")
# fix libproj.so not found on Xenial
@@ -1332,10 +1332,10 @@ ELSE()
MESSAGE(STATUS " With Qt = NO (Qt not found)")
ENDIF()
IF(SQLite3_FOUND)
IF(Sqlite3_FOUND)
MESSAGE(STATUS " With external SQLite3 = YES (License: Public Domain)")
ELSE()
MESSAGE(STATUS " With external SQLite3 = NO (SQLite3 not found, internal version is used for convenience)")
MESSAGE(STATUS " With external SQLite3 = NO (sqlite3 not found, internal version is used for convenience)")
ENDIF()
IF(WITH_ORB_OCTREE)
+30
View File
@@ -0,0 +1,30 @@
# - Find Sqlite3
# This module finds an installed Sqlite3 package.
#
# It sets the following variables:
# Sqlite3_FOUND - Set to false, or undefined, if Sqlite3 isn't found.
# Sqlite3_INCLUDE_DIR - The Sqlite3 include directory.
# Sqlite3_LIBRARY - The Sqlite3 library to link against.
FIND_PATH(Sqlite3_INCLUDE_DIR sqlite3.h PATHS $ENV{Sqlite3_ROOT_DIR}/include $ENV{Sqlite3_ROOT_DIR})
FIND_LIBRARY(Sqlite3_LIBRARY NAMES sqlite3 PATHS $ENV{Sqlite3_ROOT_DIR}/lib $ENV{Sqlite3_ROOT_DIR})
IF (Sqlite3_INCLUDE_DIR AND Sqlite3_LIBRARY)
SET(Sqlite3_FOUND TRUE)
SET(Sqlite3_INCLUDE_DIRS ${Sqlite3_INCLUDE_DIR})
SET(Sqlite3_LIBRARIES ${Sqlite3_LIBRARY})
ENDIF (Sqlite3_INCLUDE_DIR AND Sqlite3_LIBRARY)
IF (Sqlite3_FOUND)
# show which Sqlite3 was found only if not quiet
IF (NOT Sqlite3_FIND_QUIETLY)
MESSAGE(STATUS "Found Sqlite3: ${Sqlite3_INCLUDE_DIRS} ${Sqlite3_LIBRARIES}")
ENDIF (NOT Sqlite3_FIND_QUIETLY)
ELSE (Sqlite3_FOUND)
# fatal error if Sqlite3 is required but not found
IF (Sqlite3_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Sqlite3")
ENDIF (Sqlite3_FIND_REQUIRED)
ENDIF (Sqlite3_FOUND)
+3 -3
View File
@@ -173,14 +173,14 @@ SET(PUBLIC_LIBRARIES
${PCL_LIBRARIES}
)
IF(SQLite3_FOUND)
IF(Sqlite3_FOUND)
SET(INCLUDE_DIRS
${INCLUDE_DIRS}
${SQLite3_INCLUDE_DIRS}
${Sqlite3_INCLUDE_DIRS}
)
SET(LIBRARIES
${LIBRARIES}
${SQLite3_LIBRARIES}
${Sqlite3_LIBRARIES}
)
ELSE()
SET(SRC_FILES
-1
View File
@@ -915,7 +915,6 @@ Transform Odometry::process(SensorData & data, const Transform & guessIn, Odomet
{
UWARN("Odometry automatically reset to latest pose!");
this->reset(_pose);
_resetCurrentCount = _resetCountdown;
if(info)
{
*info = OdometryInfo();
+5 -2
View File
@@ -24,8 +24,11 @@ ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
RUN echo "I am building for $TARGETPLATFORM"
# cmake >=3.14 required
RUN apt update && apt install -y wget && apt-get clean && rm -rf /var/lib/apt/lists/ && \
# arm64
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then ln -s /usr/bin/cmake ~/cmake; fi
# cmake >=3.11 required for amd64 dependencies
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then apt update && apt install -y wget && apt-get clean && rm -rf /var/lib/apt/lists/ && \
wget -nv https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.tar.gz && \
tar -xzf cmake-3.17.0-Linux-x86_64.tar.gz && \
rm cmake-3.17.0-Linux-x86_64.tar.gz &&\
@@ -48,7 +48,7 @@ rm -r arengine
# resource tool
cd rtabmap-tango/build
$pwd/cmake-3.17.0-Linux-x86_64/bin/cmake -DANDROID_PREBUILD=ON ..
cmake -DANDROID_PREBUILD=ON ..
make
cd ../..
+3 -3
View File
@@ -63,7 +63,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<y>-1092</y>
<width>713</width>
<height>3933</height>
</rect>
@@ -95,7 +95,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>23</number>
<number>21</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,0">
@@ -23030,7 +23030,7 @@ Lower the ratio -&gt; higher the precision.</string>
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>1000.000000000000000</double>
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>