Skip to content

Commit ec1edda

Browse files
authored
Merge pull request #1267 from luxonis/release_v2.30.0
Release v2.30.0
2 parents 412bd60 + 4f845ca commit ec1edda

File tree

10 files changed

+42
-34
lines changed

10 files changed

+42
-34
lines changed

.github/workflows/main.workflow.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-20.04
2424

2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
with:
2828
submodules: 'recursive'
2929

@@ -42,7 +42,7 @@ jobs:
4242
runs-on: ubuntu-20.04
4343

4444
steps:
45-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4646
with:
4747
submodules: 'recursive'
4848

@@ -73,18 +73,18 @@ jobs:
7373
steps:
7474
- name: Cache .hunter folder
7575
if: matrix.os != 'windows-latest'
76-
uses: actions/cache@v3
76+
uses: actions/cache@v4
7777
with:
7878
path: ~/.hunter/
7979
key: hunter-${{ matrix.os }}-${{ matrix.cmake }}
8080
- name: Cache .hunter folder
8181
if: matrix.os == 'windows-latest'
82-
uses: actions/cache@v3
82+
uses: actions/cache@v4
8383
with:
8484
path: C:/.hunter/
8585
key: hunter-${{ matrix.os }}-${{ matrix.cmake }}
8686

87-
- uses: actions/checkout@v3
87+
- uses: actions/checkout@v4
8888
with:
8989
submodules: 'recursive'
9090

@@ -149,18 +149,18 @@ jobs:
149149
steps:
150150
- name: Cache .hunter folder
151151
if: matrix.os != 'windows-latest'
152-
uses: actions/cache@v3
152+
uses: actions/cache@v4
153153
with:
154154
path: ~/.hunter/
155155
key: hunter-${{ matrix.os }}-shared_${{ matrix.shared }}
156156
- name: Cache .hunter folder
157157
if: matrix.os == 'windows-latest'
158-
uses: actions/cache@v3
158+
uses: actions/cache@v4
159159
with:
160160
path: C:/.hunter/
161161
key: hunter-${{ matrix.os }}-shared_${{ matrix.shared }}
162162

163-
- uses: actions/checkout@v3
163+
- uses: actions/checkout@v4
164164
with:
165165
submodules: 'recursive'
166166

@@ -200,16 +200,16 @@ jobs:
200200

201201
- name: Upload Win64 shared library
202202
if: matrix.os == 'windows-latest' && matrix.shared && matrix.platform == 'x64'
203-
uses: actions/upload-artifact@v3
203+
uses: actions/upload-artifact@v4
204204
with:
205-
name: windows-prebuilt-win64
205+
name: windows-prebuilt-win64-${{ matrix.build-type }}
206206
path: ${{ env.GITHUB_WORKSPACE }}/depthai_install/
207207

208208
- name: Upload Win32 shared library
209209
if: matrix.os == 'windows-latest' && matrix.shared && matrix.platform == 'Win32'
210-
uses: actions/upload-artifact@v3
210+
uses: actions/upload-artifact@v4
211211
with:
212-
name: windows-prebuilt-win32-no-opencv
212+
name: windows-prebuilt-win32-no-opencv-${{ matrix.build-type }}
213213
path: ${{ env.GITHUB_WORKSPACE }}/depthai_install/
214214

215215
- name: Build and test add_subdirectory
@@ -241,7 +241,7 @@ jobs:
241241

242242
# Clone repository
243243
steps:
244-
- uses: actions/checkout@v3
244+
- uses: actions/checkout@v4
245245
with:
246246
submodules: 'recursive'
247247

@@ -255,20 +255,20 @@ jobs:
255255
#- name: Check if version matches
256256
# run: |
257257

258-
- uses: actions/setup-python@v3
258+
- uses: actions/setup-python@v4
259259
with:
260260
python-version: '3.8'
261261
- name: Install dependencies
262262
run: python3.8 -m pip install git-archive-all
263263

264264
- name: Download Win64 artifacts
265-
uses: actions/download-artifact@v3
265+
uses: actions/download-artifact@v4
266266
with:
267267
name: 'windows-prebuilt-win64'
268268
path: depthai-core-${{ steps.tag.outputs.version }}-win64
269269

270270
- name: Download Win32 artifacts
271-
uses: actions/download-artifact@v3
271+
uses: actions/download-artifact@v4
272272
with:
273273
name: 'windows-prebuilt-win32-no-opencv'
274274
path: depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv

.github/workflows/stability.workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
timeout-minutes: 1450 # 24h & 10minutes
2727
steps:
2828
- name: Cache .hunter folder
29-
uses: actions/cache@v3
29+
uses: actions/cache@v4
3030
with:
3131
path: $HOME/.hun_vanilla
3232
key: hunter-linux-stability-vanilla
33-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3434
with:
3535
submodules: 'recursive'
3636

.github/workflows/test.workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636

3737
steps:
3838
- name: Cache .hunter folder
39-
uses: actions/cache@v3
39+
uses: actions/cache@v4
4040
with:
4141
path: $HOME/.hun2_${{ matrix.flavor }}
4242
key: hunter-${{ matrix.os }}-${{ matrix.cmake }}
43-
- uses: actions/checkout@v3
43+
- uses: actions/checkout@v4
4444
with:
4545
submodules: 'recursive'
4646

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ if(WIN32)
5555
endif()
5656

5757
# Create depthai project
58-
project(depthai VERSION "2.29.0" LANGUAGES CXX C)
58+
project(depthai VERSION "2.30.0" LANGUAGES CXX C)
5959
get_directory_property(has_parent PARENT_DIRECTORY)
6060
if(has_parent)
6161
set(DEPTHAI_VERSION ${PROJECT_VERSION} PARENT_SCOPE)

cmake/Depthai/DepthaiDeviceSideConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")
33

44
# "full commit hash of device side binary"
5-
set(DEPTHAI_DEVICE_SIDE_COMMIT "4d360b5c56225f23e9a3d3a3999ce46c90cfdeaf")
5+
set(DEPTHAI_DEVICE_SIDE_COMMIT "a6b14a3eaa955973c529dd456064a2d3678bd7d8")
66

77
# "version if applicable"
88
set(DEPTHAI_DEVICE_SIDE_VERSION "")

cmake/Hunter/config.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ hunter_config(
66
hunter_config(
77
XLink
88
VERSION "luxonis-2021.4.2-master"
9-
URL "https://github.com/luxonis/XLink/archive/2b517e1cb1ca77bea17679f9fdeb739812431174.tar.gz"
10-
SHA1 "fa7eeb46abeb97626dad923b7733899198284587"
9+
URL "https://github.com/luxonis/XLink/archive/82839cb04f2102177fad926fb8f7fcf7b4093cb1.tar.gz"
10+
SHA1 "c371bdefb2ea9f4c382b00d8629a466b3c79b35d"
1111
CMAKE_ARGS
1212
XLINK_ENABLE_LIBUSB=${DEPTHAI_ENABLE_LIBUSB}
1313
)

include/depthai/xlink/XLinkConnection.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ class XLinkConnection {
5757
*
5858
* @param state State which the devices should be in
5959
* @param skipInvalidDevices whether or not to skip over devices that cannot be successfully communicated with
60+
* @param platform Which platforms to search for
6061
* @returns Vector of connected device information
6162
*/
62-
static std::vector<DeviceInfo> getAllConnectedDevices(XLinkDeviceState_t state = X_LINK_ANY_STATE, bool skipInvalidDevices = true);
63+
static std::vector<DeviceInfo> getAllConnectedDevices(XLinkDeviceState_t state = X_LINK_ANY_STATE,
64+
bool skipInvalidDevices = true,
65+
XLinkPlatform_t platform = X_LINK_MYRIAD_X);
6366

6467
/**
6568
* Returns information of first device with given state

src/device/DeviceBase.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,17 @@ void DeviceBase::tryGetDevice() {
322322
bool found = false;
323323
std::tie(found, deviceInfo) = getAnyAvailableDevice();
324324

325-
// If no device found, throw
326325
if(!found) {
327326
auto numConnected = getAllAvailableDevices().size();
328327
if(numConnected > 0) {
329-
throw std::runtime_error(fmt::format("No available devices ({} connected, but in use)", numConnected));
330-
} else {
331-
throw std::runtime_error("No available devices");
328+
throw std::runtime_error("No available devices (" + std::to_string(numConnected) + " connected, but in use)");
329+
}
330+
auto numDevicesAnyPlatform = dai::XLinkConnection::getAllConnectedDevices(X_LINK_ANY_STATE, false, X_LINK_ANY_PLATFORM).size();
331+
auto numDevicesRVC2 = dai::XLinkConnection::getAllConnectedDevices(X_LINK_ANY_STATE, false, X_LINK_MYRIAD_X).size();
332+
auto nonRVC2Devices = numDevicesAnyPlatform - numDevicesRVC2;
333+
if(nonRVC2Devices > 0) {
334+
throw std::runtime_error("No available RVC2 devices found, but found " + std::to_string(nonRVC2Devices)
335+
+ " non RVC2 device[s]. To use RVC4 devices, please update DepthAI to version v3.x or newer.");
332336
}
333337
}
334338
}

src/pipeline/datatype/StereoDepthConfig.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ dai::StereoDepthConfig::AlgorithmControl::DepthUnit StereoDepthConfig::getDepthU
9191
}
9292

9393
float StereoDepthConfig::getMaxDisparity() const {
94-
float maxDisp = 95.0;
94+
uint32_t maxDisp = 95;
9595
if(cfg.costMatching.disparityWidth == RawStereoDepthConfig::CostMatching::DisparityWidth::DISPARITY_64) {
9696
maxDisp = 63;
9797
}
@@ -137,7 +137,7 @@ float StereoDepthConfig::getMaxDisparity() const {
137137

138138
if(filtersToExecute.size() != 0) {
139139
if(filtersToExecute.back() != RawStereoDepthConfig::PostProcessing::Filter::MEDIAN) {
140-
maxDisp = 1 << 13;
140+
maxDisp = maxDisp * ((1 << 13) / maxDisp);
141141
}
142142
}
143143

src/xlink/XLinkConnection.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ constexpr std::chrono::milliseconds XLinkConnection::WAIT_FOR_BOOTUP_TIMEOUT;
110110
constexpr std::chrono::milliseconds XLinkConnection::WAIT_FOR_CONNECT_TIMEOUT;
111111
constexpr std::chrono::milliseconds XLinkConnection::POLLING_DELAY_TIME;
112112

113-
std::vector<DeviceInfo> XLinkConnection::getAllConnectedDevices(XLinkDeviceState_t state, bool skipInvalidDevices) {
113+
std::vector<DeviceInfo> XLinkConnection::getAllConnectedDevices(XLinkDeviceState_t state, bool skipInvalidDevices, XLinkPlatform_t platform) {
114114
initialize();
115115

116116
std::vector<DeviceInfo> devices;
@@ -119,7 +119,7 @@ std::vector<DeviceInfo> XLinkConnection::getAllConnectedDevices(XLinkDeviceState
119119
std::array<deviceDesc_t, 64> deviceDescAll = {};
120120
deviceDesc_t suitableDevice = {};
121121
suitableDevice.protocol = getDefaultProtocol();
122-
suitableDevice.platform = X_LINK_ANY_PLATFORM;
122+
suitableDevice.platform = platform;
123123
suitableDevice.state = state;
124124

125125
auto allowedDeviceMxIds = utility::getEnv("DEPTHAI_DEVICE_MXID_LIST");
@@ -162,7 +162,7 @@ std::tuple<bool, DeviceInfo> XLinkConnection::getFirstDevice(XLinkDeviceState_t
162162

163163
DeviceInfo devReq = {};
164164
devReq.protocol = X_LINK_ANY_PROTOCOL;
165-
devReq.platform = X_LINK_ANY_PLATFORM;
165+
devReq.platform = X_LINK_MYRIAD_X;
166166
devReq.name = "";
167167
devReq.mxid = "";
168168
devReq.state = state;
@@ -195,6 +195,7 @@ std::tuple<bool, DeviceInfo> XLinkConnection::getDeviceByMxId(std::string mxId,
195195
DeviceInfo dev;
196196
dev.mxid = mxId;
197197
dev.state = state;
198+
dev.platform = X_LINK_MYRIAD_X;
198199

199200
deviceDesc_t desc = {};
200201
auto res = XLinkFindFirstSuitableDevice(dev.getXLinkDeviceDesc(), &desc);

0 commit comments

Comments
 (0)