Skip to content

SHC-ASTRA/zed-sdk-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZED SDK Nix Flake

Warning

This project was generated by AI and may contain inaccuracies.

Nix packaging for the Stereolabs ZED SDK v5.2 and ZED ROS 2 Wrapper for ROS 2 Humble.

Packages

Core SDK

  • zed-sdk - Core SDK libraries, headers, firmware, and CMake configuration files
  • zed-tools - GUI applications (ZED Explorer, Depth Viewer, Diagnostic, etc.)

ROS 2 Integration

  • zed-msgs - ROS 2 message and service definitions (from nix-ros-overlay)
  • zed-components - ROS 2 component nodes for camera control and data publishing
  • zed-wrapper - Launch files, configuration, and URDF models
  • zed-ros2 - Meta-package that includes all ROS 2 packages above

Requirements

  • x86_64 Linux
  • NVIDIA GPU with CUDA 12 support
  • NVIDIA drivers installed on the host system
  • For ROS 2 packages: Uses nix-ros-overlay for ROS 2 Humble

Usage

Building Packages

# Core SDK
nix build .#zed-sdk --impure
nix build .#zed-tools --impure

# ROS 2 packages
nix build .#zed-msgs --impure
nix build .#zed-components --impure
nix build .#zed-wrapper --impure
nix build .#zed-ros2 --impure  # All ROS 2 packages

Note: --impure is required due to the unfree license of the ZED SDK. Alternatively, set NIXPKGS_ALLOW_UNFREE=1.

Flake Input

Add to your flake.nix:

{
  inputs = {
    zed-sdk-nix.url = "github:your-username/zed-sdk-nix";
  };

  outputs = { zed-sdk-nix, ... }: {
    # Available packages:
    # zed-sdk-nix.packages.x86_64-linux.zed-sdk
    # zed-sdk-nix.packages.x86_64-linux.zed-tools
    # zed-sdk-nix.packages.x86_64-linux.zed-msgs
    # zed-sdk-nix.packages.x86_64-linux.zed-components
    # zed-sdk-nix.packages.x86_64-linux.zed-wrapper
    # zed-sdk-nix.packages.x86_64-linux.zed-ros2
  };
}

NixOS Module

Enable system-wide ZED camera support:

{
  imports = [ zed-sdk-nix.nixosModules.default ];

  hardware.zed.enable = true;
}

This will:

  • Install udev rules for ZED camera hardware access
  • Configure kernel parameters for high-bandwidth USB3 streaming

ROS 2 Development Shell

For developing with the ZED ROS 2 wrapper:

devShells.default = pkgs.mkShell {
  packages = [
    zed-sdk-nix.packages.x86_64-linux.zed-ros2
  ];

  shellHook = ''
    source ${zed-sdk-nix.packages.x86_64-linux.zed-wrapper}/share/zed_wrapper/local_setup.bash
  '';
};

Running the ZED Camera Node

After building, you can launch the ZED camera node:

# Source the ROS 2 workspace
source result/share/zed_wrapper/local_setup.bash

# Launch the camera
ros2 launch zed_wrapper zed_camera.launch.py

Package Details

zed-sdk

The core Stereolabs SDK containing:

  • Shared libraries (libsl_zed.so, etc.)
  • C++ headers
  • CMake configuration for find_package(ZED)
  • Camera firmware
  • AI model resources

zed-tools

GUI applications for camera management:

  • ZED Explorer
  • ZED Depth Viewer
  • ZED Diagnostic
  • ZED Sensor Viewer

zed-msgs

Re-exported from nix-ros-overlay. ROS 2 message definitions including:

  • ObjectsStamped - Detected objects with tracking
  • DepthInfoStamped - Depth sensing metadata
  • PlaneStamped - Detected planes
  • PosTrackStatus - Positional tracking status
  • Various service definitions

zed-components

ROS 2 component libraries:

  • stereolabs::ZedCamera - Full-featured ZED camera component
  • stereolabs::ZedCameraOne - Lightweight single-camera component

These publish standard ROS 2 messages (images, point clouds, IMU, etc.) and ZED-specific messages.

zed-wrapper

Launch files and configuration:

  • zed_camera.launch.py - Main launch file
  • YAML configuration files
  • URDF/Xacro robot description files

zed-ros2

Meta-package that depends on all ZED ROS 2 packages for convenient installation.

CMake Integration

For C++ projects using the ZED SDK directly:

find_package(ZED 5 REQUIRED)
target_link_libraries(your_target PRIVATE ${ZED_LIBRARIES})
target_include_directories(your_target PRIVATE ${ZED_INCLUDE_DIRS})

Environment Setup

The SDK requires ZED_DIR to be set. A wrapper script zed-env is provided:

$(nix build .#zed-sdk --print-out-paths --impure)/bin/zed-env your-command

License

The ZED SDK is proprietary software by Stereolabs. This Nix packaging is provided for convenience but does not grant any additional rights to use the SDK beyond those provided by Stereolabs.

The ROS 2 wrapper packages are AGPL-3.0-only licensed.

About

nix packaging for zed sdk

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages