Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/workflows/build-natives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ jobs:
build-linux-x86_64:
runs-on: [ubuntu-22.04]
container:
image: stereolabs/zed:5.0-devel-cuda12.8-ubuntu20.04
image: stereolabs/zed:5.1-devel-cuda12.8-ubuntu22.04
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install git wget curl build-essential libusb-dev -y
- uses: actions/checkout@v4
apt-get install git wget curl build-essential -y
- uses: actions/checkout@v6
- name: Mark workspace as safe
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
Comment on lines +22 to +24
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this is needed, but otherwise I get an error when running EndBug/add-and-commit

Error: fatal: detected dubious ownership in repository at '/__w/zed-java-api/zed-java-api'

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand All @@ -37,13 +40,13 @@ jobs:
build-linux-l4t:
runs-on: [ubuntu-22.04-arm]
container:
image: stereolabs/zed:5.0-devel-l4t-r35.3
image: stereolabs/zed:5.1-devel-l4t-r35.4
needs: [build-linux-x86_64]
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install git wget curl build-essential libusb-dev openjdk-17-jdk -y
apt-get install git wget curl build-essential openjdk-17-jdk -y
# Cannot use for now, see https://github.com/actions/setup-node/issues/922
# - uses: actions/checkout@v4
- name: Checkout
Expand Down Expand Up @@ -87,21 +90,21 @@ jobs:
runs-on: [windows-2022]
needs: [build-linux-l4t]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Pull repo
run: |
git reset --hard
git pull
- uses: Jimver/cuda-toolkit@v0.2.15
- uses: Jimver/cuda-toolkit@v0.2.30
id: cuda-toolkit
with:
cuda: '11.8.0'
cuda: '12.8.0'
method: 'network'
- name: Install dependencies
run: |
python -m pip install gdown
gdown https://drive.google.com/uc?id=1yFqOcx3FotWFV4evgbXAvM4azFyfhzW1
tar -xvf ZEDSDK-Windows-5.0.2.tar.gz -C "C:\\Program Files (x86)"
gdown https://drive.google.com/uc?id=1s0Pec1WOa10ZU6yaIG0xdH45VcTF24M1
tar -xvf ZEDSDK-Windows-5.1.2.tar.gz -C "C:\\Program Files (x86)"
- uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: 2022
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# zed-java-api
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).

Currently compatible with ZED SDK **5.0.x**.
Currently compatible with ZED SDK **5.1.x**.

Allows you to use Stereolabs sensors such as ZED 2, ZED 2i, ZED X, ZED Mini, ZED X Mini from Java.
## Usage
zed-java-api requires ZED SDK to be installed on the system. Download ZED SDK for your system from [here](https://www.stereolabs.com/developers/release). You do not need to install zed-c-api, just ZED SDK.

Supported platforms:
- Linux (Ubuntu 20.04+ or similar x86_64)
- Linux, NVIDIA Jetson (L4T R35.3+ arm64)
- Linux (Ubuntu 22.04+ or similar x86_64)
- Linux, NVIDIA Jetson (L4T R35.4+ arm64)
- Windows (Windows 10+ x86_64)

Requires Java 17.
Expand Down
4 changes: 2 additions & 2 deletions cppbuild.bash
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ popd
cd cppbuild
cp -r ../src/main/java/* .

JAVACPP_VERSION=1.5.10
JAVACPP_CUDA_VERSION=12.3-8.9-1.5.10
JAVACPP_VERSION=1.5.11
JAVACPP_CUDA_VERSION=12.6-9.5-1.5.11
Comment on lines +39 to +40
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generating files using JavaCPP 1.5.11 to be consistent with our JavaCPP dependencies

if [ ! -f javacpp.jar ]; then
curl -L https://github.com/bytedeco/javacpp/releases/download/$JAVACPP_VERSION/javacpp-platform-$JAVACPP_VERSION-bin.zip -o javacpp-platform-$JAVACPP_VERSION-bin.zip
unzip -j javacpp-platform-$JAVACPP_VERSION-bin.zip
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_AI_Model_status.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_BarometerData.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_BatchParameters.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_Bodies.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_BodyData.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_BodyTrackingParameters.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_CalibrationParameters.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_CameraConfiguration.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_CameraIdentifier.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_CameraInformation.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_CameraMetrics.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_CameraParameters.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_CommunicationParameters.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_CustomBoxObjectData.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_CustomMaskObjectData.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
11 changes: 7 additions & 4 deletions src/main/java/us/ihmc/zed/SL_DeviceProperties.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down Expand Up @@ -78,16 +78,19 @@ public class SL_DeviceProperties extends Pointer {
/**
\brief badge name (zedx_ar0234)
*/
public native @Cast("char*") BytePointer camera_badge(); public native SL_DeviceProperties camera_badge(BytePointer setter);
public native @Cast("char") byte camera_badge(int i); public native SL_DeviceProperties camera_badge(int i, byte setter);
@MemberGetter public native @Cast("char*") BytePointer camera_badge();

/**
\brief Name of sensor (zedx)
*/
public native @Cast("char*") BytePointer camera_sensor_model(); public native SL_DeviceProperties camera_sensor_model(BytePointer setter);
public native @Cast("char") byte camera_sensor_model(int i); public native SL_DeviceProperties camera_sensor_model(int i, byte setter);
@MemberGetter public native @Cast("char*") BytePointer camera_sensor_model();
/**
\brief Name of Camera in DT (ZED_CAM1)
*/
public native @Cast("char*") BytePointer camera_name(); public native SL_DeviceProperties camera_name(BytePointer setter);
public native @Cast("char") byte camera_name(int i); public native SL_DeviceProperties camera_name(int i, byte setter);
@MemberGetter public native @Cast("char*") BytePointer camera_name();
/**
\brief Input type of the camera.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_ECEF.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_ENU.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_FusionConfiguration.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_FusionMetrics.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_GNSSData.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_GeoPose.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_HealthStatus.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_IMUData.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_InitFusionParameters.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/us/ihmc/zed/SL_InitParameters.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down Expand Up @@ -212,7 +212,7 @@ This parameter allows you to specify the minimum depth value (from the camera) t
This parameter allows you to enable the verbosity of the ZED SDK to get a variety of runtime information in the console.
\n When developing an application, enabling verbose (<code>\ref sdk_verbose >= 1</code>) mode can help you understand the current ZED SDK behavior.
\n However, this might not be desirable in a shipped version.
\n Default: 0 (no verbose message)
\n Default: 1 (verbose messages enabled)
\note The verbose messages can also be exported into a log file.
*/
public native int sdk_verbose(); public native SL_InitParameters sdk_verbose(int setter);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_InputType.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_Landmark.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
17 changes: 13 additions & 4 deletions src/main/java/us/ihmc/zed/SL_Landmark2D.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down Expand Up @@ -33,11 +33,20 @@ public class SL_Landmark2D extends Pointer {
}

/**
\brief Unique identifier for the landmark.
\brief Unique identifier for the landmark.
*/
public native @Cast("uint64_t") long id(); public native SL_Landmark2D id(long setter);

/**
\brief Projection of the landmark in the image.
*/
\brief Projection of the landmark in the image.
*/
public native @ByRef SL_Uint2 image_position(); public native SL_Landmark2D image_position(SL_Uint2 setter);

/**
\brief Confidence score indicating the likelihood that the landmark is associated with a dynamic object.
<p>
The value ranges from 0 to 1, where a smaller value indicates greater confidence that the landmark
is owned by a dynamic object.
*/
public native float dynamic_confidence(); public native SL_Landmark2D dynamic_confidence(float setter);
}
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_LatLng.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_MagnetometerData.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_Matrix3f.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_Matrix4f.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/ihmc/zed/SL_ObjectData.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE

package us.ihmc.zed;

Expand Down
Loading