Skip to content

Commit

Permalink
Merge branch 'PRBonn:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
fratopa authored May 8, 2023
2 parents ccae476 + 1b05291 commit fedd940
Show file tree
Hide file tree
Showing 15 changed files with 95 additions and 44 deletions.
48 changes: 48 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
stages:
- format
- build
cache:
paths:
- .cache/pip

#----- format stage --------------------------------------------------------------------------------
black:
image: python:3.8
stage: format
before_script:
- pip install black
script:
- black --line-length 100 --check $CI_PROJECT_DIR

clang-format:
image: ubuntu:22.04
stage: format
before_script:
- apt-get update && apt-get install --no-install-recommends -y clang-format
script:
- clang-format -Werror --dry-run $(find . -regextype posix-extended -regex ".*\.(cpp|hpp|h)")

#----- build stage ---------------------------------------------------------------------------------
pip_package:
image: python:3.8
stage: build
script:
- VERBOSE=1 pip install --verbose ./python/
- kiss_icp_pipeline --version

ros1_noetic:
image: osrf/ros:noetic-desktop-full
stage: build
before_script:
- rm -rf ~/catkin_ws/
- mkdir -p ~/catkin_ws/
- cp -r ${CI_PROJECT_DIR} ~/catkin_ws/src
script:
- cd ~/catkin_ws/
- catkin_make

ros2_humble:
image: osrf/ros:humble-desktop
stage: build
script:
- colcon build --event-handlers console_direct+
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<br />
<br />
[KISS-ICP](https://www.ipb.uni-bonn.de/wp-content/papercite-data/pdf/vizzo2023ral.pdf) is a LiDAR Odometry pipeline that **just works** on most of the cases withouth tunning any parameter.
[KISS-ICP](https://www.ipb.uni-bonn.de/wp-content/papercite-data/pdf/vizzo2023ral.pdf) is a LiDAR Odometry pipeline that **just works** on most of the cases without tunning any parameter.

<p align="center">
<a href="https://user-images.githubusercontent.com/21349875/219626075-d67e9165-31a2-4a1b-8c26-9f04e7d195ec.mp4"><img alt="KISS-ICP Demo" src="https://user-images.githubusercontent.com/21349875/211829074-474bec08-0129-4e34-85e7-62265e44a7de.png"></a>
Expand Down Expand Up @@ -94,7 +94,7 @@ If you use this library for any academic work, please cite our original [paper](

## Contributing

We envision KISS-ICP as a comunity-driven project, we love to see how the project is growing thanks to the contributions from the comunity. We would love to see your face in the list below, just open a Pull Request!
We envision KISS-ICP as a community-driven project, we love to see how the project is growing thanks to the contributions from the community. We would love to see your face in the list below, just open a Pull Request!

<a href="https://github.com/PRBonn/kiss-icp/graphs/contributors">
<img src="https://contrib.rocks/image?repo=PRBonn/kiss-icp" />
Expand Down
13 changes: 8 additions & 5 deletions cpp/kiss_icp/3rdparty/eigen/eigen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@
# release a new version that is not 3.4. That version does not include this necessary changes:
# - https://gitlab.com/libeigen/eigen/-/merge_requests/893/diffs

cmake_minimum_required(VERSION 3.25)
include(FetchContent)
FetchContent_Declare(Eigen SYSTEM URL https://github.com/nachovizzo/eigen/archive/refs/tags/3.4.90.tar.gz)

set(EIGEN_BUILD_DOC OFF CACHE BOOL "Don't build Eigen docs")
set(EIGEN_BUILD_TESTING OFF CACHE BOOL "Don't build Eigen tests")
set(EIGEN_BUILD_PKGCONFIG OFF CACHE BOOL "Don't build Eigen pkg-config")
set(EIGEN_BUILD_BLAS OFF CACHE BOOL "Don't build blas module")
set(EIGEN_BUILD_LAPACK OFF CACHE BOOL "Don't build lapack module")

FetchContent_MakeAvailable(Eigen)
include(FetchContent)
FetchContent_Declare(eigen SYSTEM URL https://github.com/nachovizzo/eigen/archive/refs/tags/3.4.90.tar.gz)
FetchContent_MakeAvailable(eigen)

if(${CMAKE_VERSION} VERSION_LESS 3.25)
get_target_property(eigen_include_dirs eigen INTERFACE_INCLUDE_DIRECTORIES)
set_target_properties(eigen PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${eigen_include_dirs}")
endif()
7 changes: 3 additions & 4 deletions cpp/kiss_icp/3rdparty/sophus/sophus.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
# 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.
# TODO: after https://github.com/strasdat/Sophus/pull/502 gets merged go back to mainstream
cmake_minimum_required(VERSION 3.25)
include(FetchContent)
FetchContent_Declare(Sophus SYSTEM URL https://github.com/nachovizzo/Sophus/archive/refs/tags/1.22.11.tar.gz)

set(SOPHUS_USE_BASIC_LOGGING ON CACHE BOOL "Don't use fmt for Sophus libraru")
set(BUILD_SOPHUS_TESTS OFF CACHE BOOL "Don't build Sophus tests")
set(BUILD_SOPHUS_EXAMPLES OFF CACHE BOOL "Don't build Sophus Examples")

FetchContent_MakeAvailable(Sophus)
# TODO: after https://github.com/strasdat/Sophus/pull/502 gets merged go back to mainstream
FetchContent_Declare(sophus SYSTEM URL https://github.com/nachovizzo/Sophus/archive/refs/tags/1.22.11.tar.gz)
FetchContent_MakeAvailable(sophus)
37 changes: 13 additions & 24 deletions cpp/kiss_icp/3rdparty/tbb/tbb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,18 @@
# 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.
include(ExternalProject)
include(GNUInstallDirs)
find_package(Threads)
# option(BUILD_SHARED_LIBS ON)
option(BUILD_SHARED_LIBS OFF)
option(TBBMALLOC_BUILD OFF)
option(TBB_EXAMPLES OFF)
option(TBB_STRICT OFF)
option(TBB_TEST OFF)

ExternalProject_Add(
external_tbb
PREFIX tbb
URL https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.8.0.tar.gz
URL_HASH SHA256=eee380323bb7ce864355ed9431f85c43955faaae9e9bce35c62b372d7ffd9f8b
UPDATE_COMMAND ""
CMAKE_ARGS # CMake flags:
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=Release
# custom flags:
-DBUILD_SHARED_LIBS=OFF
-DTBB_EXAMPLES=OFF
-DTBB_STRICT=OFF
-DTBB_TEST=OFF)
include(FetchContent)
FetchContent_Declare(tbb SYSTEM URL https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.8.0.tar.gz)
FetchContent_MakeAvailable(tbb)

ExternalProject_Get_Property(external_tbb INSTALL_DIR)
add_library(TBBHelper INTERFACE)
add_dependencies(TBBHelper external_tbb)
target_include_directories(TBBHelper SYSTEM INTERFACE ${INSTALL_DIR}/${CMAKE_INSTALL_INCLUDEDIR})
target_link_directories(TBBHelper INTERFACE ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR})
target_link_libraries(TBBHelper INTERFACE tbb Threads::Threads)
add_library(TBB::tbb ALIAS TBBHelper)
if(${CMAKE_VERSION} VERSION_LESS 3.25)
get_target_property(tbb_include_dirs tbb INTERFACE_INCLUDE_DIRECTORIES)
set_target_properties(tbb PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${tbb_include_dirs}")
endif()
1 change: 0 additions & 1 deletion cpp/kiss_icp/3rdparty/tsl_robin/tsl_robin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# 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.
cmake_minimum_required(VERSION 3.25)
include(FetchContent)
FetchContent_Declare(tessil SYSTEM URL https://github.com/Tessil/robin-map/archive/refs/tags/v1.0.1.tar.gz)
FetchContent_MakeAvailable(tessil)
2 changes: 1 addition & 1 deletion cpp/kiss_icp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
cmake_minimum_required(VERSION 3.16...3.26)
project(kiss_icp_cpp VERSION 0.2.8 LANGUAGES CXX)
project(kiss_icp_cpp VERSION 0.2.9 LANGUAGES CXX)

# Setup build options
option(USE_SYSTEM_EIGEN3 "Use system pre-installed Eigen" ON)
Expand Down
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
cmake_minimum_required(VERSION 3.16...3.26)
project(kiss_icp_pybind VERSION 0.2.8 LANGUAGES CXX)
project(kiss_icp_pybind VERSION 0.2.9 LANGUAGES CXX)

# Set build type
set(CMAKE_BUILD_TYPE Release)
Expand Down
2 changes: 1 addition & 1 deletion python/kiss_icp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
# 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.
__version__ = "0.2.8"
__version__ = "0.2.9"
4 changes: 3 additions & 1 deletion python/kiss_icp/pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ endif()

pybind11_add_module(kiss_icp_pybind MODULE kiss_icp_pybind.cpp)
target_link_libraries(kiss_icp_pybind PRIVATE kiss_icp::core kiss_icp::metrics)
install(TARGETS kiss_icp_pybind DESTINATION .)
install(TARGETS kiss_icp_pybind DESTINATION . COMPONENT python_bindings)
add_custom_target(install_python_bindings ${CMAKE_COMMAND} -DCMAKE_INSTALL_COMPONENT=python_bindings -P
"${PROJECT_BINARY_DIR}/cmake_install.cmake" DEPENDS kiss_icp_pybind)
12 changes: 11 additions & 1 deletion python/kiss_icp/tools/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,20 @@ def guess_dataloader(data: Path, default_dataloader: str):

def version_callback(value: bool):
if value:
try:
# Check that the python bindings are properly built and can be loaded at runtime
from kiss_icp.pybind import kiss_icp_pybind
except ImportError as e:
print(80 * "*")
print(f"[ERRROR] Python bindings not properly built! Please open a issue on github")
print(f"[ERRROR] '{e}'")
print(80 * "*")
raise typer.Exit(1)

import kiss_icp

print(f"KISS-ICP Version: {kiss_icp.__version__}")
raise typer.Exit()
raise typer.Exit(0)


def name_callback(value: str):
Expand Down
2 changes: 1 addition & 1 deletion python/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = kiss_icp
version = 0.2.8
version = 0.2.9
author = Ignacio Vizzo
author_email = [email protected]
description = Simple yet effective 3D LiDAR-Odometry registration pipeline
Expand Down
1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def cmd_exists(cmd):
setup(
packages=find_packages(),
cmake_install_dir="kiss_icp/pybind/",
cmake_install_target="install_python_bindings",
entry_points={"console_scripts": ["kiss_icp_pipeline=kiss_icp.tools.cmd:run"]},
install_requires=[
"natsort",
Expand Down
2 changes: 1 addition & 1 deletion ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
cmake_minimum_required(VERSION 3.16...3.26)
project(kiss_icp VERSION 0.2.8 LANGUAGES CXX)
project(kiss_icp VERSION 0.2.9 LANGUAGES CXX)

set(ignore ${CATKIN_INSTALL_INTO_PREFIX_ROOT})
set(CMAKE_BUILD_TYPE Release)
Expand Down
2 changes: 1 addition & 1 deletion ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
-->
<package format="3">
<name>kiss_icp</name>
<version>0.2.8</version>
<version>0.2.9</version>
<description>KISS-ICP ROS Wrappers</description>
<maintainer email="[email protected]">ivizzo</maintainer>
<license>MIT</license>
Expand Down

0 comments on commit fedd940

Please sign in to comment.