mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Windows CI: make vcpkg download compatible with draft release (#1727)
* Windows CI: make vcpkg download compatible with draft release * forcing nvdia driver dll to be ignored in fixup_bundle * disabling opencv cudec and python * disabling rtabmap-console --version on cuda build * Added assert when bad imu data is provided. Added checks when zed sdk is returning nan imu data. * Updated zed sdk5 resolution and quality * Updated zed sdk5 resolution and quality * Fixing parameters reloaded when testing camera. Also fixed app freezing when closing Preferences dialog after using test camera dialog * cleanup and debug logs * Added dialogs when starting/stopping sensors/detection. Fixed nullptr bug on MainWindow::handleEvents * renamed * found a way to expose ZED model downloads * Updated default config path on Windows * Fixed extra endline in file logging (windows) * Fixed camera local transform when used with lidar and odomSensor * CI(macos): build g2o from source with OpenMP (libomp include/link fix) * Mac: added ceres dep, fixed omp not found by cmake * Mac: bundle orbbec extensions * stripping rpath of orbbec's extensions * cleanup * Realsense2 error as error (not warning) * Fixed config ownership changed to root when sarting in sudo. LidarVLP16: fixed crash on Mac by reimplementing our own socket threading * LidarVLP16: own socket implementation only for Mac (linux and windows use original PCL's reader)
This commit is contained in:
@@ -203,6 +203,47 @@ runs:
|
||||
cmake --build build -j$NPROC
|
||||
DESTDIR="$STAGE" cmake --install build
|
||||
|
||||
# ----------------------------- g2o ------------------------------
|
||||
- name: Cache g2o
|
||||
id: cache-g2o
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}/deps-stage/g2o
|
||||
key: g2o-67cbe15c-${{ inputs.os }}-${{ steps.depver.outputs.hash }}
|
||||
|
||||
- name: Build g2o
|
||||
if: steps.cache-g2o.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
NPROC=$(sysctl -n hw.logicalcpu)
|
||||
SRC="${{ runner.temp }}/src-deps/g2o"
|
||||
STAGE="${{ runner.temp }}/deps-stage/g2o"
|
||||
rm -rf "$SRC"; mkdir -p "$SRC" "$STAGE"
|
||||
# g2o pins a commit (not a tag), so clone then checkout.
|
||||
git clone https://github.com/RainerKuemmerle/g2o.git "$SRC/g2o"
|
||||
cd "$SRC/g2o"
|
||||
git checkout 67cbe15c998737ac6705d3cd18201a72be0d073d
|
||||
# CMAKE_INSTALL_PREFIX=/usr/local so it stages under usr/local like the
|
||||
# other deps. Homebrew's libomp is keg-only and g2o does not propagate
|
||||
# OpenMP's include/lib dirs, so with Apple clang <omp.h> isn't found and
|
||||
# libomp isn't linked; add its include (-I) and lib (-L -lomp) explicitly.
|
||||
LIBOMP=$(brew --prefix libomp)
|
||||
cmake -B build \
|
||||
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DCMAKE_PREFIX_PATH="$LIBOMP" \
|
||||
-DCMAKE_C_FLAGS="-I$LIBOMP/include" \
|
||||
-DCMAKE_CXX_FLAGS="-I$LIBOMP/include" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-L$LIBOMP/lib -lomp" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-L$LIBOMP/lib -lomp" \
|
||||
-DG2O_BUILD_APPS=OFF \
|
||||
-DG2O_BUILD_EXAMPLES=OFF \
|
||||
-DG2O_USE_OPENMP=ON \
|
||||
-DG2O_USE_OPENGL=OFF
|
||||
cmake --build build -j$NPROC
|
||||
DESTDIR="$STAGE" cmake --install build
|
||||
|
||||
# ------------------- install all units into /usr/local ----------
|
||||
- name: Install source dependencies into /usr/local
|
||||
shell: bash
|
||||
@@ -213,7 +254,7 @@ runs:
|
||||
set -e
|
||||
STAGE="${{ runner.temp }}/deps-stage"
|
||||
found=0
|
||||
for unit in gtsam pointmatcher orbbec depthai opengv; do
|
||||
for unit in gtsam pointmatcher orbbec depthai opengv g2o; do
|
||||
if [ -d "$STAGE/$unit/usr/local" ]; then
|
||||
sudo cp -a "$STAGE/$unit/usr/local/." /usr/local/
|
||||
found=1
|
||||
|
||||
@@ -26,7 +26,7 @@ runs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ runner.workspace }}/vcpkg_installed
|
||||
key: ${{ runner.os }}-vcpkg-export-66c0373d-x64-vs2022-cuda130_v1
|
||||
key: ${{ runner.os }}-vcpkg-export-66c0373d-x64-vs2022-cuda130_v4
|
||||
|
||||
- name: Download and Install vcpkg
|
||||
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
|
||||
@@ -35,10 +35,25 @@ runs:
|
||||
$install_dir = "${{ runner.workspace }}\vcpkg_installed"
|
||||
$archivePath = "${{ runner.workspace }}\vcpkg-export.7z"
|
||||
|
||||
# The file has been built locally with bundle-windows-deps.bat
|
||||
$url = "https://github.com/introlab/rtabmap/releases/download/0.23.1/vcpkg-export-66c0373d-x64-vs2022-cuda130.7z"
|
||||
|
||||
Invoke-WebRequest -Uri $url -OutFile $archivePath
|
||||
# The 7z is built locally with bundle_windows_deps_cuda.bat and uploaded to a
|
||||
# GitHub release. Resolve it by filename via the API (authenticated with the
|
||||
# built-in token) so it works even from a *draft* release and regardless of
|
||||
# the (changing) asset id. Requires the workflow to run in-repo (github.token
|
||||
# can't read introlab drafts from a fork PR).
|
||||
$repo = "introlab/rtabmap"
|
||||
$releaseTag = "0.23.8"
|
||||
$assetName = "vcpkg-export-66c0373d-x64-vs2022-cuda130.7z"
|
||||
$apiHeaders = @{ Authorization = "Bearer ${{ github.token }}"; "User-Agent" = "rtabmap-ci"; Accept = "application/vnd.github+json" }
|
||||
# Select the release by tag_name (populated on drafts too, and unique), then
|
||||
# take the asset from THAT release so concurrent releases can't be confused.
|
||||
$rel = (Invoke-RestMethod -Uri "https://api.github.com/repos/$repo/releases?per_page=100" -Headers $apiHeaders) |
|
||||
Where-Object { $_.tag_name -eq $releaseTag } | Select-Object -First 1
|
||||
if (-not $rel) { throw "Release tagged $releaseTag not found (including drafts)" }
|
||||
$asset = $rel.assets | Where-Object { $_.name -eq $assetName } | Select-Object -First 1
|
||||
if (-not $asset) { throw "Asset $assetName not found in release $releaseTag" }
|
||||
Write-Host "Downloading $assetName (asset id $($asset.id)) ..."
|
||||
$dlHeaders = @{ Authorization = "Bearer ${{ github.token }}"; "User-Agent" = "rtabmap-ci"; Accept = "application/octet-stream" }
|
||||
Invoke-WebRequest -Uri $asset.url -Headers $dlHeaders -OutFile $archivePath
|
||||
& 7z x $archivePath "-o$install_dir" -y
|
||||
|
||||
- name: Add vcpkg to PATH and env variable
|
||||
|
||||
25
.github/actions/install-windows-deps/action.yml
vendored
25
.github/actions/install-windows-deps/action.yml
vendored
@@ -13,7 +13,7 @@ runs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ runner.workspace }}/vcpkg_installed
|
||||
key: ${{ runner.os }}-vcpkg-export-66c0373d-x64-vs2022-v4
|
||||
key: ${{ runner.os }}-vcpkg-export-66c0373d-x64-vs2022-v6
|
||||
|
||||
- name: Download and Install vcpkg
|
||||
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
|
||||
@@ -22,10 +22,25 @@ runs:
|
||||
$install_dir = "${{ runner.workspace }}\vcpkg_installed"
|
||||
$archivePath = "${{ runner.workspace }}\vcpkg-export.7z"
|
||||
|
||||
# The file has been built locally with bundle-windows-deps.bat
|
||||
$url = "https://github.com/introlab/rtabmap/releases/download/0.23.1/vcpkg-export-66c0373d-x64-vs2022.7z"
|
||||
|
||||
Invoke-WebRequest -Uri $url -OutFile $archivePath
|
||||
# The 7z is built locally with bundle_windows_deps.bat and uploaded to a
|
||||
# GitHub release. Resolve it by filename via the API (authenticated with the
|
||||
# built-in token) so it works even from a *draft* release and regardless of
|
||||
# the (changing) asset id. Requires the workflow to run in-repo (github.token
|
||||
# can't read introlab drafts from a fork PR).
|
||||
$repo = "introlab/rtabmap"
|
||||
$releaseTag = "0.23.8"
|
||||
$assetName = "vcpkg-export-66c0373d-x64-vs2022.7z"
|
||||
$apiHeaders = @{ Authorization = "Bearer ${{ github.token }}"; "User-Agent" = "rtabmap-ci"; Accept = "application/vnd.github+json" }
|
||||
# Select the release by tag_name (populated on drafts too, and unique), then
|
||||
# take the asset from THAT release so concurrent releases can't be confused.
|
||||
$rel = (Invoke-RestMethod -Uri "https://api.github.com/repos/$repo/releases?per_page=100" -Headers $apiHeaders) |
|
||||
Where-Object { $_.tag_name -eq $releaseTag } | Select-Object -First 1
|
||||
if (-not $rel) { throw "Release tagged $releaseTag not found (including drafts)" }
|
||||
$asset = $rel.assets | Where-Object { $_.name -eq $assetName } | Select-Object -First 1
|
||||
if (-not $asset) { throw "Asset $assetName not found in release $releaseTag" }
|
||||
Write-Host "Downloading $assetName (asset id $($asset.id)) ..."
|
||||
$dlHeaders = @{ Authorization = "Bearer ${{ github.token }}"; "User-Agent" = "rtabmap-ci"; Accept = "application/octet-stream" }
|
||||
Invoke-WebRequest -Uri $asset.url -Headers $dlHeaders -OutFile $archivePath
|
||||
& 7z x $archivePath "-o$install_dir" -y
|
||||
|
||||
- name: Add vcpkg to PATH and env variable
|
||||
|
||||
23
.github/workflows/cmake-macos.yml
vendored
23
.github/workflows/cmake-macos.yml
vendored
@@ -26,24 +26,19 @@ jobs:
|
||||
include:
|
||||
- build_name: macos-sequoia-intel
|
||||
os: macos-15-intel
|
||||
extra_cmake_def: '-DBUILD_AS_BUNDLE=ON -DWITH_ORBBEC_SDK=ON -DWITH_DEPTHAI=ON'
|
||||
- build_name: macos-sequoia-apple-silicon
|
||||
os: macos-15
|
||||
extra_cmake_def: '-DBUILD_AS_BUNDLE=ON -DWITH_ORBBEC_SDK=ON -DWITH_DEPTHAI=ON'
|
||||
- build_name: macos-tahoe-intel
|
||||
os: macos-26-intel
|
||||
extra_cmake_def: '-DBUILD_AS_BUNDLE=ON -DWITH_ORBBEC_SDK=ON -DWITH_DEPTHAI=ON'
|
||||
- build_name: macos-tahoe-apple-silicon
|
||||
os: macos-26
|
||||
extra_cmake_def: '-DBUILD_AS_BUNDLE=ON -DWITH_ORBBEC_SDK=ON -DWITH_DEPTHAI=ON'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Brew Dependencies
|
||||
run: |
|
||||
# Update brew and install from Brewfile if present, or specific packages
|
||||
brew install pcl opencv octomap g2o pdal yaml-cpp librealsense libfreenect libusb zlib
|
||||
brew install pcl opencv octomap pdal yaml-cpp librealsense libfreenect libusb zlib libomp suite-sparse ceres-solver
|
||||
|
||||
- name: Install Source Dependencies
|
||||
# Build (and per-dependency cache) the source-only deps not available from
|
||||
@@ -55,7 +50,21 @@ jobs:
|
||||
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.extra_cmake_def }}
|
||||
# Apple clang has no built-in OpenMP; point find_package(OpenMP) at
|
||||
# Homebrew's keg-only libomp so PCL/g2o/rtabmap enable OpenMP instead of
|
||||
# repeatedly logging "Could NOT find OpenMP".
|
||||
LIBOMP=$(brew --prefix libomp)
|
||||
cmake -B ${{github.workspace}}/build \
|
||||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
|
||||
-DBUILD_AS_BUNDLE=ON \
|
||||
-DWITH_ORBBEC_SDK=ON \
|
||||
-DWITH_DEPTHAI=ON \
|
||||
-DWITH_CERES=ON \
|
||||
-DOpenMP_C_FLAGS="-Xclang -fopenmp -I$LIBOMP/include" \
|
||||
-DOpenMP_C_LIB_NAMES=omp \
|
||||
-DOpenMP_CXX_FLAGS="-Xclang -fopenmp -I$LIBOMP/include" \
|
||||
-DOpenMP_CXX_LIB_NAMES=omp \
|
||||
-DOpenMP_omp_LIBRARY="$LIBOMP/lib/libomp.dylib"
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
|
||||
13
.github/workflows/cmake-windows.yml
vendored
13
.github/workflows/cmake-windows.yml
vendored
@@ -74,6 +74,14 @@ jobs:
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Info
|
||||
# Skipped for CUDA: the binary links ZED (sl_zed64.dll -> nvcuvid/nvEncodeAPI64),
|
||||
# which need the NVIDIA driver; the GPU-less runner can't load the exe.
|
||||
if: matrix.build_name != 'windows-2022-cuda'
|
||||
working-directory: ${{github.workspace}}/build/bin
|
||||
run: |
|
||||
./rtabmap-console --version
|
||||
|
||||
- name: Build Windows Package
|
||||
shell: pwsh
|
||||
run: |
|
||||
@@ -88,11 +96,6 @@ jobs:
|
||||
shell: pwsh
|
||||
run: Get-ChildItem -Path "build" -Filter "RTABMap-*" | Rename-Item -NewName { $_.BaseName + "_cuda" + $_.Extension }
|
||||
|
||||
- name: Info
|
||||
working-directory: ${{github.workspace}}/build/bin
|
||||
run: |
|
||||
./rtabmap-console --version
|
||||
|
||||
- name: Upload RTABMap Artifacts (ZIP)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user