From d79965eafd8dbcb64c6a83320aec7a4675da12ed Mon Sep 17 00:00:00 2001 From: Ignacio Vizzo Date: Tue, 9 Jul 2024 16:44:28 +0200 Subject: [PATCH 1/6] Add a new job just to proof the build is now broken --- .github/workflows/cpp.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 131dda9e..59468999 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -25,3 +25,25 @@ jobs: run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/cpp/kiss_icp - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + # As the previous job will always install the dependencies from cmake, and this is guaranteed to + # work, we also want to support dev sandboxes where the main dependencies are already + # pre-installed in the system. For now, we only support dev machines under a GNU/Linux + # environmnets. If you are reading this and need the same functionallity in Windows/macOS please + # open a ticket. + cpp_api_dev: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-20.04] + + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential cmake git libeigen3-dev libtbb-dev + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/cpp/kiss_icp + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} From e1b5e0276273f1176b3bb2ab2b9ccbc56fcccce0 Mon Sep 17 00:00:00 2001 From: Ignacio Vizzo Date: Tue, 9 Jul 2024 16:49:31 +0200 Subject: [PATCH 2/6] force 22.04 to make sure it's only a 20.04 problem --- .github/workflows/cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 59468999..fd7f68c8 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -35,7 +35,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, ubuntu-20.04] + os: [ubuntu-22.04] steps: - uses: actions/checkout@v3 From 064536e8b4cd7aac3536c18f897938c5aa92ee7b Mon Sep 17 00:00:00 2001 From: Ignacio Vizzo Date: Tue, 9 Jul 2024 16:52:43 +0200 Subject: [PATCH 3/6] Revert "force 22.04 to make sure it's only a 20.04 problem" This reverts commit e1b5e0276273f1176b3bb2ab2b9ccbc56fcccce0. --- .github/workflows/cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index fd7f68c8..59468999 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -35,7 +35,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-22.04, ubuntu-20.04] steps: - uses: actions/checkout@v3 From cd8e56e91003da858f41748cc635088fff675dad Mon Sep 17 00:00:00 2001 From: Ignacio Vizzo Date: Tue, 9 Jul 2024 16:54:07 +0200 Subject: [PATCH 4/6] Add cache to ci build --- .github/workflows/cpp.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 59468999..bbb8ef8a 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -39,6 +39,13 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.apt/cache + key: ${{ runner.os }}-apt-${{ hashFiles('**/ubuntu_dependencies.yml') }} + restore-keys: | + ${{ runner.os }}-apt- - name: Install dependencies run: | sudo apt-get update From 17e033b613a5041ad122ef918d989792bf754c3d Mon Sep 17 00:00:00 2001 From: Ignacio Vizzo Date: Tue, 9 Jul 2024 17:00:39 +0200 Subject: [PATCH 5/6] Attempt to fix build in Ubuntu 20.04 --- cpp/kiss_icp/core/Registration.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpp/kiss_icp/core/Registration.cpp b/cpp/kiss_icp/core/Registration.cpp index d7adb4df..137fa50c 100644 --- a/cpp/kiss_icp/core/Registration.cpp +++ b/cpp/kiss_icp/core/Registration.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -171,7 +172,8 @@ Registration::Registration(int max_num_iteration, double convergence_criterion, : max_num_iterations_(max_num_iteration), convergence_criterion_(convergence_criterion), // Only manipulate the number of threads if the user specifies something greater than 0 - max_num_threads_(max_num_threads > 0 ? max_num_threads : tbb::info::default_concurrency()) { + max_num_threads_(max_num_threads > 0 ? max_num_threads + : tbb::this_task_arena::max_concurrency()) { // This global variable requires static duration storage to be able to manipulate the max // concurrency from TBB across the entire class static const auto tbb_control_settings = tbb::global_control( From 0e921b2c2caf19d74b5151606e3e621d60086f6f Mon Sep 17 00:00:00 2001 From: Ignacio Vizzo Date: Tue, 9 Jul 2024 17:24:16 +0200 Subject: [PATCH 6/6] add this comment just to annoy ourselves --- cpp/kiss_icp/core/Deskew.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/kiss_icp/core/Deskew.cpp b/cpp/kiss_icp/core/Deskew.cpp index 9b721fe2..fe20b77e 100644 --- a/cpp/kiss_icp/core/Deskew.cpp +++ b/cpp/kiss_icp/core/Deskew.cpp @@ -39,6 +39,7 @@ std::vector DeSkewScan(const std::vector &fram const Sophus::SE3d &delta) { const auto delta_pose = delta.log(); std::vector corrected_frame(frame.size()); + // TODO(All): This tbb execution is ignoring the max_n_threads config value tbb::parallel_for(size_t(0), frame.size(), [&](size_t i) { const auto motion = Sophus::SE3d::exp((timestamps[i] - mid_pose_timestamp) * delta_pose); corrected_frame[i] = motion * frame[i];