Skip to content

Commit 3533aaf

Browse files
moratomMatevz Morato
andauthored
V3 vcpkg update (#1349)
* Minimal update * Add support for CMake 4 * xtensor updates * nlohmann_json update * Update basalt for new magic_enum * Remove rgbd example temporarly since it doesn't compile * Fix RTABMAP port I've also tried to update to e19b0c3dc4571a75f60823f6efb622769f764f31 but while it builds, it freezes on startup and no results are produced. * Update xtensor-python * Add updated VSLAM nodes * Update README.md * Fix rerun_sdk detection logic * Only build the rerun example if there's PCL support * Update xtensor-python * Update xtensor with cmake < 3.29 support * Update the CI workflow * Don't build the GUI features in OpenCV if not needed * Bump CMake version for Python wheels to 3.30 * Uncomment release logic * Remove WIP changes --------- Co-authored-by: Matevz Morato <[email protected]>
1 parent db79d24 commit 3533aaf

File tree

27 files changed

+153
-87
lines changed

27 files changed

+153
-87
lines changed

.github/workflows/main.workflow.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- develop
99
- v3_develop
1010
tags:
11-
- 'v2*'
11+
- 'v*'
1212
pull_request:
1313
branches:
1414
- main
@@ -61,7 +61,7 @@ jobs:
6161
strategy:
6262
matrix:
6363
os: [macos-latest, windows-latest, ubuntu-latest]
64-
cmake: ['3.29.x']
64+
cmake: ['3.22.x', '4.0.x']
6565

6666
steps:
6767
- uses: actions/checkout@v4
@@ -225,19 +225,19 @@ jobs:
225225
merge-multiple: true
226226
path: depthai-core-${{ steps.tag.outputs.version }}-win64
227227

228-
- name: Download Win32 artifacts
229-
uses: actions/download-artifact@v4
230-
with:
231-
pattern: windows-prebuilt-win32-no-opencv*
232-
merge-multiple: true
233-
path: depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv
228+
# - name: Download Win32 artifacts
229+
# uses: actions/download-artifact@v4
230+
# with:
231+
# pattern: windows-prebuilt-win32-no-opencv*
232+
# merge-multiple: true
233+
# path: depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv
234234

235235
- name: Create release assets
236236
run: |
237237
git-archive-all depthai-core-${{ steps.tag.outputs.version }}.tar.gz
238238
git-archive-all depthai-core-${{ steps.tag.outputs.version }}.zip
239239
zip -r depthai-core-${{ steps.tag.outputs.version }}-win64.zip depthai-core-${{ steps.tag.outputs.version }}-win64
240-
zip -r depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv.zip depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv
240+
# zip -r depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv.zip depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv
241241
242242
# Create GitHub release
243243
- uses: actions/create-release@master
@@ -288,12 +288,12 @@ jobs:
288288
asset_name: depthai-core-${{ steps.tag.outputs.version }}-win64.zip
289289
asset_content_type: application/octet-stream
290290

291-
- name: Upload Win32 package (zip)
292-
uses: actions/[email protected]
293-
env:
294-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
295-
with:
296-
upload_url: ${{ steps.createRelease.outputs.upload_url }}
297-
asset_path: ${{ github.workspace }}/depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv.zip
298-
asset_name: depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv.zip
299-
asset_content_type: application/octet-stream
291+
# - name: Upload Win32 package (zip)
292+
# uses: actions/[email protected]
293+
# env:
294+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
295+
# with:
296+
# upload_url: ${{ steps.createRelease.outputs.upload_url }}
297+
# asset_path: ${{ github.workspace }}/depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv.zip
298+
# asset_name: depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv.zip
299+
# asset_content_type: application/octet-stream

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
url = https://github.com/xtensor-stack/xtl
1010
[submodule "bindings/python/external/xtensor-python"]
1111
path = bindings/python/external/xtensor-python
12-
url = https://github.com/xtensor-stack/xtensor-python.git
12+
url = https://github.com/luxonis/xtensor-python.git
1313
[submodule "3rdparty/pybind11_opencv_numpy"]
1414
path = bindings/python/external/pybind11_opencv_numpy
1515
url = https://github.com/luxonis/pybind11_opencv_numpy.git

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ endif()
88

99
find_program(CCACHE_PROGRAM ccache)
1010

11+
set(CMAKE_POLICY_VERSION_MINIMUM 3.5) # Support for CMake 4
12+
1113
if(CCACHE_PROGRAM)
1214
message(STATUS "Using ccache: ${CCACHE_PROGRAM}")
1315

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@ DepthAI library doesn't yet provide API stability guarantees. While we take care
1818

1919
## Examples
2020
Examples for both C++ and Python are available in the `examples` folder. To see hwo to build and run them see [README.md](./examples/README.md) for more information.
21+
To build the examples in C++ configure with the following option added:
22+
```
23+
cmake -S. -Bbuild -D'DEPTHAI_BUILD_EXAMPLES=ON'
24+
cmake --build build
25+
```
2126

2227
## Dependencies
23-
- CMake >= 3.14 and <4.0
28+
- CMake >= 3.20
2429
- C/C++17 compiler
2530
- [optional] OpenCV 4 (required if building examples and for record and replay)
2631
- [optional] PCL (required for point cloud example)
2732

28-
> ℹ️ We'll be adding support for CMake 4 shortly.
29-
3033
To install OpenCV:
3134
MacOS: `brew install opencv`
3235
Linux: `sudo apt install libopencv-dev`

bindings/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "mypy", "numpy", "jinja2", "cmake==3.25"]
2+
requires = ["setuptools", "wheel", "mypy", "numpy", "jinja2", "cmake==3.30"]

cmake/depthaiDependencies.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ if(DEPTHAI_XTENSOR_SUPPORT)
8484
if(NOT DEPTHAI_XTENSOR_EXTERNAL)
8585
FetchContent_Declare(
8686
xtl
87-
GIT_REPOSITORY https://github.com/xtensor-stack/xtl.git
88-
GIT_TAG 0.7.6
87+
GIT_REPOSITORY https://github.com/luxonis/xtl.git
88+
GIT_TAG 2da8e13ef3d7d9d6ccae3fd68f07892160e8b6c6
8989
GIT_SHALLOW TRUE
9090
)
9191

9292
FetchContent_Declare(
9393
xtensor
94-
GIT_REPOSITORY https://github.com/xtensor-stack/xtensor.git
95-
GIT_TAG 0.24.3
94+
GIT_REPOSITORY https://github.com/luxonis/xtensor.git
95+
GIT_TAG d070cfcba9418ec45e5399708100eee1181a9573
9696
GIT_SHALLOW TRUE
9797
)
9898
FetchContent_MakeAvailable(xtl xtensor)
@@ -117,7 +117,7 @@ if(NOT DEPTHAI_JSON_EXTERNAL)
117117
FetchContent_Declare(
118118
nlohmann_json
119119
GIT_REPOSITORY https://github.com/nlohmann/json.git
120-
GIT_TAG v3.11.3
120+
GIT_TAG v3.12.0
121121
)
122122
# Json is a public dependancy, so it has to be installed
123123
set(JSON_Install ON CACHE BOOL "Install nlohmann_json" FORCE)

cmake/depthaiVcpkgFeatures.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ if(DEPTHAI_OPENCV_SUPPORT AND NOT DEPTHAI_VCPKG_INTERNAL_ONLY)
1818
list(APPEND VCPKG_MANIFEST_FEATURES "opencv-support")
1919
endif()
2020

21+
if(DEPTHAI_OPENCV_SUPPORT AND NOT DEPTHAI_VCPKG_INTERNAL_ONLY AND DEPTHAI_BUILD_EXAMPLES)
22+
list(APPEND VCPKG_MANIFEST_FEATURES "opencv-gui")
23+
endif()
24+
2125
if(DEPTHAI_PCL_SUPPORT AND NOT DEPTHAI_VCPKG_INTERNAL_ONLY)
2226
list(APPEND VCPKG_MANIFEST_FEATURES "pcl-support")
2327
endif()
@@ -61,3 +65,7 @@ endif()
6165
if(DEPTHAI_ENABLE_LIBUSB)
6266
list(APPEND VCPKG_MANIFEST_FEATURES "usb")
6367
endif()
68+
69+
if(DEPTHAI_BUILD_EXAMPLES AND (DEPTHAI_PCL_SUPPORT OR DEPTHAI_BASALT_SUPPORT OR DEPTHAI_RTABMAP_SUPPORT))
70+
list(APPEND VCPKG_MANIFEST_FEATURES "rerun-sdk")
71+
endif()

cmake/ports/basalt/portfile.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
vcpkg_from_github(
33
OUT_SOURCE_PATH SOURCE_PATH
44
REPO luxonis/basalt
5-
REF bf3d2c33685b4315fa2f1407619c301c3135e891
6-
SHA512 346104eee47e08afd82d134b89c44163dee4528ed98875afd8bd6bd153d28f185145c5f938d0ff52423edca1434391ae6478ab3646f014c7598075babeadc054
5+
REF ef61684ca32d0f827981270f780830c5f84c8e85
6+
SHA512 be82d5f8971265178b8ab1f784fecb498963d3d8b641a47c541416dcea34f49e4138b2b191c930a5e1d9ca5b2ebcd1c1872cc0a2bb6bced683e9d44240f6eed3
77
HEAD_REF depthai
88
)
99
vcpkg_cmake_configure(
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/corelib/src/optimizer/OptimizerCeres.cpp b/corelib/src/optimizer/OptimizerCeres.cpp
2+
index 04de80b9..046d401c 100644
3+
--- a/corelib/src/optimizer/OptimizerCeres.cpp
4+
+++ b/corelib/src/optimizer/OptimizerCeres.cpp
5+
@@ -197,7 +197,7 @@ std::map<int, Transform> OptimizerCeres::optimize(
6+
7+
if(angle_local_manifold == NULL)
8+
{
9+
- angle_local_manifold = ceres::examples::AngleManfold::Create();
10+
+ angle_local_manifold = ceres::examples::AngleManifold::Create();
11+
}
12+
SetCeresProblemManifold(problem, &pose_begin_iter->second.yaw_radians, angle_local_manifold);
13+
SetCeresProblemManifold(problem, &pose_end_iter->second.yaw_radians, angle_local_manifold);

0 commit comments

Comments
 (0)