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.
- zed-sdk - Core SDK libraries, headers, firmware, and CMake configuration files
- zed-tools - GUI applications (ZED Explorer, Depth Viewer, Diagnostic, etc.)
- 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
- 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
# 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 packagesNote: --impure is required due to the unfree license of the ZED SDK. Alternatively, set NIXPKGS_ALLOW_UNFREE=1.
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
};
}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
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
'';
};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.pyThe core Stereolabs SDK containing:
- Shared libraries (
libsl_zed.so, etc.) - C++ headers
- CMake configuration for
find_package(ZED) - Camera firmware
- AI model resources
GUI applications for camera management:
- ZED Explorer
- ZED Depth Viewer
- ZED Diagnostic
- ZED Sensor Viewer
Re-exported from nix-ros-overlay. ROS 2 message definitions including:
ObjectsStamped- Detected objects with trackingDepthInfoStamped- Depth sensing metadataPlaneStamped- Detected planesPosTrackStatus- Positional tracking status- Various service definitions
ROS 2 component libraries:
stereolabs::ZedCamera- Full-featured ZED camera componentstereolabs::ZedCameraOne- Lightweight single-camera component
These publish standard ROS 2 messages (images, point clouds, IMU, etc.) and ZED-specific messages.
Launch files and configuration:
zed_camera.launch.py- Main launch file- YAML configuration files
- URDF/Xacro robot description files
Meta-package that depends on all ZED ROS 2 packages for convenient installation.
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})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-commandThe 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.