Skip to content

Commit e475bd5

Browse files
committed
5.0.x
1 parent cb8f6fb commit e475bd5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+962
-205
lines changed

.github/workflows/build-natives.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build-linux-x86_64:
1313
runs-on: [self-hosted, ihmc-runner-nvidia]
1414
container:
15-
image: stereolabs/zed:4.2-devel-cuda12.1-ubuntu20.04
15+
image: stereolabs/zed:5.0-devel-cuda12.8-ubuntu20.04
1616
steps:
1717
- name: Install dependencies
1818
run: |
@@ -37,7 +37,7 @@ jobs:
3737
build-linux-l4t:
3838
runs-on: [self-hosted, ihmc-runner-nvidia]
3939
container:
40-
image: stereolabs/zed:4.2-devel-l4t-r35.3
40+
image: stereolabs/zed:5.0-devel-l4t-r35.3
4141
needs: [build-linux-x86_64]
4242
steps:
4343
- name: Install dependencies
@@ -100,8 +100,8 @@ jobs:
100100
- name: Install dependencies
101101
run: |
102102
python -m pip install gdown
103-
gdown https://drive.google.com/uc?id=1uDEVu8hOGVJdnO_GEVWJu25QJmdcuxn-
104-
tar -xvf ZEDSDK-Windows-4.2.1.tar.gz -C "C:\\Program Files (x86)"
103+
gdown https://drive.google.com/uc?id=1yFqOcx3FotWFV4evgbXAvM4azFyfhzW1
104+
tar -xvf ZEDSDK-Windows-5.0.2.tar.gz -C "C:\\Program Files (x86)"
105105
- uses: ilammy/msvc-dev-cmd@v1
106106
with:
107107
vsversion: 2019

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# zed-java-api
22
zed-java-api provides Java JNI bindings for ZED SDK. The bindings are based on [zed-c-api](https://github.com/stereolabs/zed-c-api).
33

4-
Currently compatible with ZED SDK **4.2.x**.
4+
Currently compatible with ZED SDK **5.0.x**.
55

66
Allows you to use Stereolabs sensors such as ZED 2, ZED 2i, ZED X, ZED Mini, ZED X Mini from Java.
77
## Usage
@@ -16,7 +16,7 @@ Requires Java 17.
1616
### Gradle
1717
```
1818
dependencies {
19-
implementation("us.ihmc:zed-java-api:4.2.0_4")
19+
implementation("us.ihmc:zed-java-api:5.0.0")
2020
}
2121
```
2222
### Maven
@@ -25,7 +25,7 @@ dependencies {
2525
<dependency>
2626
<groupId>us.ihmc</groupId>
2727
<artifactId>zed-java-api</artifactId>
28-
<version>4.2.0_4</version>
28+
<version>5.0.0</version>
2929
</dependency>
3030
</dependencies>
3131
```

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group = "us.ihmc"
7-
version = "4.2.0_5"
7+
version = "5.0.0"
88

99
repositories {
1010
mavenCentral()

cppbuild.bash

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ pushd .
44
mkdir cppbuild
55
cd cppbuild
66

7-
ZED_C_API_VERSION=4.2.0
87
if [ ! -f "zed-c-api.tar.gz" ]; then
9-
curl -o zed-c-api.tar.gz https://codeload.github.com/stereolabs/zed-c-api/tar.gz/refs/tags/v$ZED_C_API_VERSION
8+
wget https://github.com/stereolabs/zed-c-api/archive/refs/heads/main.zip
109
fi
1110

12-
tar -xvf zed-c-api.tar.gz
11+
unzip main.zip
1312

14-
cp ../patches/CMakeLists.txt.zed_c_api.patch zed-c-api-$ZED_C_API_VERSION/CMakeLists.txt.zed_c_api.patch
13+
cp ../patches/CMakeLists.txt.zed_c_api.patch zed-c-api-main/CMakeLists.txt.zed_c_api.patch
1514

16-
cd zed-c-api-$ZED_C_API_VERSION
15+
cd zed-c-api-main
1716

1817
patch CMakeLists.txt CMakeLists.txt.zed_c_api.patch
1918

src/main/java/us/ihmc/zed/SL_BarometerData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class SL_BarometerData extends Pointer {
3535
/** \brief Whether the barometer sensor is available in your camera.*/
3636
public native @Cast("bool") boolean is_available(); public native SL_BarometerData is_available(boolean setter);
3737
/** \brief Data acquisition timestamp in nanoseconds.*/
38-
public native @Cast("unsigned long long") long timestamp_ns(); public native SL_BarometerData timestamp_ns(long setter);
38+
public native @Cast("uint64_t") long timestamp_ns(); public native SL_BarometerData timestamp_ns(long setter);
3939
/** \brief Ambient air pressure in hectopascal (hPa).*/
4040
public native float pressure(); public native SL_BarometerData pressure(float setter);
4141
/** \brief Relative altitude from first camera position (at \ref sl_open_camera() time).*/

src/main/java/us/ihmc/zed/SL_Bodies.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class SL_Bodies extends Pointer {
4444
<p>
4545
This value is especially useful for the async mode to synchronize the data.
4646
*/
47-
public native @Cast("unsigned long long") long timestamp(); public native SL_Bodies timestamp(long setter);
47+
public native @Cast("uint64_t") long timestamp(); public native SL_Bodies timestamp(long setter);
4848
/**
4949
\brief Whether \ref body_list has already been retrieved or not.
5050
*/

src/main/java/us/ihmc/zed/SL_BodyTrackingParameters.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ public class SL_BodyTrackingParameters extends Pointer {
9191
\note The value cannot be greater than SL_InitParameters.depth_maximum_distance and its unit is defined in SL_InitParameters.coordinate_unit.
9292
*/
9393
public native float max_range(); public native SL_BodyTrackingParameters max_range(float setter);
94-
95-
// #if 0
96-
// #endif
9794
/**
9895
\brief Prediction duration of the ZED SDK when an object is not detected anymore before switching its state to \ref SL_OBJECT_TRACKING_STATE_SEARCHING.
9996

src/main/java/us/ihmc/zed/SL_CameraIdentifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ public class SL_CameraIdentifier extends Pointer {
3232
return new SL_CameraIdentifier((Pointer)this).offsetAddress(i);
3333
}
3434

35-
public native @Cast("unsigned long long int") long sn(); public native SL_CameraIdentifier sn(long setter);
35+
public native @Cast("uint64_t") long sn(); public native SL_CameraIdentifier sn(long setter);
3636
}

src/main/java/us/ihmc/zed/SL_CustomBoxObjectData.java

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ public class SL_CustomBoxObjectData extends Pointer {
8888
/**
8989
\brief Maximum tracking time threshold (in seconds) before dropping the tracked object when unseen for this amount of time.
9090
By default, let the tracker decide internally based on the internal sub class of the tracked object.
91-
Only valid for static object.
9291
*/
9392
public native float tracking_timeout(); public native SL_CustomBoxObjectData tracking_timeout(float setter);
9493

@@ -98,4 +97,45 @@ public class SL_CustomBoxObjectData extends Pointer {
9897
Only valid for static object.
9998
*/
10099
public native float tracking_max_dist(); public native SL_CustomBoxObjectData tracking_max_dist(float setter);
100+
101+
/**
102+
\brief Maximum allowed 3D width.
103+
<p>
104+
Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped.
105+
Default: -1 (no filtering)
106+
*/
107+
public native float max_box_width_meters(); public native SL_CustomBoxObjectData max_box_width_meters(float setter);
108+
109+
/**
110+
\brief Minimum allowed 3D width.
111+
<p>
112+
Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped.
113+
Default: -1 (no filtering)
114+
*/
115+
public native float min_box_width_meters(); public native SL_CustomBoxObjectData min_box_width_meters(float setter);
116+
117+
/**
118+
\brief Maximum allowed 3D height.
119+
<p>
120+
Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped.
121+
Default: -1 (no filtering)
122+
*/
123+
public native float max_box_height_meters(); public native SL_CustomBoxObjectData max_box_height_meters(float setter);
124+
125+
/**
126+
\brief Minimum allowed 3D height.
127+
<p>
128+
Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped.
129+
Default: -1 (no filtering)
130+
*/
131+
public native float min_box_height_meters(); public native SL_CustomBoxObjectData min_box_height_meters(float setter);
132+
133+
/**
134+
\brief Manually override the acceleration preset.
135+
If set, this value takes precedence over the selected preset, allowing for a custom maximum acceleration.
136+
Takes precedence over the runtime parameter, if also set.
137+
Unit is m/s^2.
138+
Defaults: NaN
139+
*/
140+
public native float max_allowed_acceleration(); public native SL_CustomBoxObjectData max_allowed_acceleration(float setter);
101141
}

src/main/java/us/ihmc/zed/SL_CustomMaskObjectData.java

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public class SL_CustomMaskObjectData extends Pointer {
8383
/**
8484
\brief Maximum tracking time threshold (in seconds) before dropping the tracked object when unseen for this amount of time.
8585
By default, let the tracker decide internally based on the internal sub class of the tracked object.
86-
Only valid for static object.
8786
*/
8887
public native float tracking_timeout(); public native SL_CustomMaskObjectData tracking_timeout(float setter);
8988

@@ -96,6 +95,47 @@ public class SL_CustomMaskObjectData extends Pointer {
9695

9796
/**
9897
\brief 2D mask of the object inside its bounding box.
99-
*/
98+
*/
10099
public native @Cast("unsigned char*") BytePointer box_mask(); public native SL_CustomMaskObjectData box_mask(BytePointer setter);
100+
101+
/**
102+
\brief Maximum allowed 3D width.
103+
<p>
104+
Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped.
105+
Default: -1 (no filtering)
106+
*/
107+
public native float max_box_width_meters(); public native SL_CustomMaskObjectData max_box_width_meters(float setter);
108+
109+
/**
110+
\brief Minimum allowed 3D width.
111+
<p>
112+
Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped.
113+
Default: -1 (no filtering)
114+
*/
115+
public native float min_box_width_meters(); public native SL_CustomMaskObjectData min_box_width_meters(float setter);
116+
117+
/**
118+
\brief Maximum allowed 3D height.
119+
<p>
120+
Any prediction bigger than that will be either discarded (if object is tracked and in SEARCHING state) or clamped.
121+
Default: -1 (no filtering)
122+
*/
123+
public native float max_box_height_meters(); public native SL_CustomMaskObjectData max_box_height_meters(float setter);
124+
125+
/**
126+
\brief Minimum allowed 3D height.
127+
<p>
128+
Any prediction smaller than that will be either discarded (if object is tracked and in SEARCHING state) or clamped.
129+
Default: -1 (no filtering)
130+
*/
131+
public native float min_box_height_meters(); public native SL_CustomMaskObjectData min_box_height_meters(float setter);
132+
133+
/**
134+
\brief Manually override the acceleration preset.
135+
If set, this value takes precedence over the selected preset, allowing for a custom maximum acceleration.
136+
Takes precedence over the runtime parameter, if also set.
137+
Unit is m/s^2.
138+
Defaults: NaN
139+
*/
140+
public native float max_allowed_acceleration(); public native SL_CustomMaskObjectData max_allowed_acceleration(float setter);
101141
}

0 commit comments

Comments
 (0)