zed-ros-wrapper

stereolabsMIT长期未更新

把 Stereolabs ZED 双目相机接入 ROS 的官方封装包,提供图像、深度、位姿和点云等话题,方便在机器人系统里做立体视觉与 SLAM 开发。

ROS wrapper for the ZED SDK

v4.0.8发布于 2024-03-27 10:27 UTC499star409fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
cd ~/catkin_ws/src && git clone --recursive https://github.com/stereolabs/zed-ros-wrapper.git && cd ../ && rosdep install --from-paths src --ignore-src -r -y && catkin_make -DCMAKE_BUILD_TYPE=Release && source ./devel/setup.bash
硬件要求按 README 说明

需要 NVIDIA GPU 与 CUDA,因为依赖 ZED SDK v4.1;系统要求 Ubuntu 20.04 + ROS Noetic;README 未给出具体显存数值。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把 ZED 立体相机接入 ROS Noetic,输出图像、深度、点云与位姿

把 Stereolabs ZED 双目相机接入 ROS 的官方封装包,提供图像、深度、位姿和点云等话题,方便在机器人系统里做立体视觉与 SLAM 开发。

核心能力

  • 输出左右目图像、深度图、点云和位姿话题
  • 支持同时接入多台 ZED 相机
  • 通过 launch 文件按型号启动,可按序列号选相机
  • 运行时用 service 启停 SVO 录像与空间建图
  • 提供 2D 模式固定 Z 值与 roll/pitch 便于地面机器人

容易踩的坑

必须先自行从官网下载安装 ZED SDK v4.1 及 CUDA,否则编译不过;zed_interfaces 已拆到独立仓库,需按新说明更新子模块;Body Tracking 与 Geo Tracking 在本 ROS1 wrapper 中不可用,需改用 ROS2 wrapper。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v4.0.8
  1. v4.0.8最新正式版2024-03-27 · 2024-03-27 10:27 UTC

    v4.0.8

    • Remove start_object_detection and stop_object_detection services
    • Add enable_object_detection service that takes a bool as parameter to enable/disable the OD module (same behavior as in ROS 2 Wrapper)
    • Add parameter 'object_detection/allow_reduced_precision_inference'
    • Add parameter 'object_detection/prediction_timeout'
    • The parameter 'object_detection/model' is no more an integer, but a string with the full name of the supported OD model
    • Add pose and odometry status publishers
    • Improve odometry and pose publishing and TF broadcasting
    • Add ROS '.clang-format'
    • Code refactoring
    • Add 'set_roi' and 'reset_roi' services
    • Add parameter 'pos_tracking/depth_min_range'
    • Add parameter 'pos_tracking/set_as_static'
    • Change the parameter 'general/resolution' to 'general/grab_resolution' and replace numeric values with strings
    • Add 'general.svo_realtime' parameter
    • Change 'general/verbose' to 'general/sdk_verbose'
    • Add 'general/region_of_interest' parameter
    • Change the parameter 'depth/quality' to 'depth/depth_mode' and replace numeric values with strings
    • Improve the behavior of the "NO DEPTH" mode
    • Remove the parameters 'depth_downsample_factor' and 'img_downsample_factor'
    • Add the parameter 'pub_resolution' and 'pub_downscale_factor'
    • Add 'pos_tracking/set_gravity_as_origin' parameter. If 'true' align the positional tracking world to imu gravity measurement. Keep the yaw from the user initial pose.
    • Add 'pos_tracking/pos_tracking_mode' parameter. Matches the ZED SDK setting: 'QUALITY', 'STANDARD'
    • Fix the warning 'Elaboration takes longer [...]'
    • 'pub_frame_rate' now controls the 'InitParameters::grab_compute_capping_fps' parameter of the ZED SDK instead of controlling the frequency of a parallel thread. It's not a Dynamic parameter anymore.
    • Change 'general/camera_flip' parameter to string: 'AUTO', 'ON', 'OFF'
    • Change 'general/verbose' from bool to integer
  2. v4.0.52023-09-08 · 2023-09-08 12:07 UTC
    查看更新说明

    v4.0.5

    • Support for ZED SDK v4.0
    • Remove parameter object_detection.body_fitting
    • Remove parameter depth.sensing_mode
    • Remove parameter video.extrinsic_in_camera_frame
    • Skeleton Tracking is no more available. Migrate to ROS 2 Wrapper if you need it
    • sensors and object_detection parameters are now in common.yaml
    • Move parameters general.resolution and general.grab_frame_rate to cameras yaml files to support the different configurations on ZED X and ZED X Mini.
    • Remove support for ROS Melodic that reached EOL
    • Add 1080p for ZED X and ZED X Mini
  3. v3.8.x2022-10-18 · 2022-10-18 10:48 UTC
    查看更新说明

    v3.8.x

    • Fix the frame links of barometer, magnetometer, and temperature sensors for ZED2i
    • Add parameter sensors/max_pub_rate to set the maximum publishing frequency of sensors data
    • Improve Sensors thread
    • Fix wrong TF broadcasting when calling the set_pose, reset_tracking, and reset_odometry services. Now the initial odometry is coherent with the new starting point.
    • Add Plane Detection. See ZED Documentation
    • Fix TF timestamp issue in SVO mode
    • Fix units for Atmospheric pressure data. Now the value is correctly published in Pascal according to the topic specification.
  4. v3.7.x2022-02-24 · 2022-02-24 11:05 UTC
    查看更新说明

    v3.7.x

    • Add support for the new Neural Depth mode
    • Add support for head detection model
    • Add support for sport-related object class
    • Add support for X_MEDIUM neural network models
    • Enable AI for ZED Mini
    • Add new <zed>_base_link frame on the base of the camera to easily handle camera positioning on robots. Thx @civerachb-cpr
    • Improve URDF by adding 3° slope for ZED and ZED2, X-offset for optical frames to correctly match the CMOS sensors position on the PCB, X-offset for mounting screw on ZED2i
    • Add zed_macro.urdf.xacro to be included by other xacro file to easily integrate ZED cameras in the robot descriptions. See PR #771 for details. Thx @civerachb-cpr
    • New parameter save_area_memory_db_on_exit to force Area Memory saving when the node is closed and Area Memory is enabled and valid.
    • Add service save_Area_map to trigger an Area Memory saving.
    • New tool function to transform a relative path to absolute.
    • Enabled static IMU TF broadcasting even it publish_tf is set to false, making the two options independent. Thx to @bjsowa
    • Moved the zed_interfaces folder in the new zed-ros-interfaces repository. The new repository is useful to receive the topics from a ZED node on system where the zed-ros-wrapper repository cannot be fully installed, i.e. systems without CUDA support. For this repository nothing changes because the zed_interfaces folder is replaced by the zed-ros-interfaces git submodule to automatically satisfy all the dependencies.
    • Fix sensors topics pubblication for ZED2i. The support for the new camera was not complete
    • Fix sensor_msgs type for depth image in OpenNI mode, from sensor_msgs::image_encodings::mono16 to sensor_msgs::image_encodings::TYPE_16UC1. Depth image in OpenNI mode is now compatible with the nodelet depthimage_to_laserscan
  5. v3.52021-05-28 · 2021-05-28 13:36 UTC
    查看更新说明
    • Add support for ROS Noetic
    • Add support for SDK v3.5
    • Add support for the new ZED 2i
    • Add new parameter pos_tracking/pos_tracking_enabled to enable positional tracking from start even if not required by any subscribed topic. This is useful, for example, to keep the TF always updated.
    • Add new example to start multiple ZED Nodelets inside the same nodelet manager
    • Fixed issue #690

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    This package lets you use the ZED stereo camera with ROS. It outputs the camera's left and right images, depth map, point cloud, and pose information and supports the use of multiple ZED cameras.

    More information

    Note: The zed_interfaces package has been removed from this repository and moved to its own zed-ros-interfaces repository to allow better integration of the ZED Wrapper on remote ground stations that do not require the full package to be installed. To update your repository please follow the new update instructions. For more information please read issue #750.

    Getting started

    Prerequisites

    Build the repository

    The zed_ros_wrapper is a catkin package. It depends on the following ROS packages:

    • roscpp
    • image_transport
    • rosconsole
    • sensor_msgs
    • stereo_msgs
    • std_msgs
    • std_srvs
    • message_filters
    • tf2_ros
    • nodelet
    • tf2_geometry_msgs
    • message_generation
    • diagnostic_updater
    • dynamic_reconfigure
    • zed_interfaces

    Open a terminal, clone the repository, update the dependencies and build the packages:

    $ cd ~/catkin_ws/src
    $ git clone --recursive https://github.com/stereolabs/zed-ros-wrapper.git
    $ cd ../
    $ rosdep install --from-paths src --ignore-src -r -y
    $ catkin_make -DCMAKE_BUILD_TYPE=Release
    $ source ./devel/setup.bash
    
    Update the local repository

    To update the repository to the latest release you must use the following command to retrieve the latest commits of zed-ros-wrapper and of all the submodules:

    $ git checkout master # if you are not on the main branch  
    $ git pull --recurse-submodules # update recursively all the submodules
    

    Remember to always clean the cache of your catkin workspace before compiling with the catkin_make command to be sure that everything will work as expected:

    $ roscd
    $ cd ..
    $ rm -rf build devel
    $ catkin_make -DCMAKE_BUILD_TYPE=Release
    

    Run the ZED wrapper

    To launch the ZED node use

    ZED camera:

    $ roslaunch zed_wrapper zed.launch
    

    ZED Mini camera:

    $ roslaunch zed_wrapper zedm.launch
    

    ZED 2 camera:

    $ roslaunch zed_wrapper zed2.launch
    

    ZED 2i camera:

    $ roslaunch zed_wrapper zed2i.launch
    

    ZED X camera:

    $ roslaunch zed_wrapper zedx.launch  
    

    ZED X Mini camera:

    $ roslaunch zed_wrapper zedxm.launch  
    

    To select the camera from its serial number:

     $ roslaunch zed_wrapper zed.launch serial_number:=1010 #replace 1010 with the actual SN
    

    Rviz visualization

    Example launch files to start a pre-configured Rviz environment to visualize the data of ZED, ZED Mini, ZED 2, ZED X, and ZED X Mini cameras are provided in the zed-ros-examples repository

    SVO recording

    SVO recording can be started and stopped while the ZED node is running using the service start_svo_recording and the service stop_svo_recording. More information

    Object Detection

    The SDK v3.0 introduces the Object Detection and Tracking module. The Object Detection module is available only with a ZED 2 camera.

    The Object Detection can be enabled automatically when the node start setting the parameter object_detection/od_enabled to true in the file common.yaml.

    The Object Detection can be enabled/disabled manually calling the service enable_object_detection.

    Body Tracking

    The Body Tracking module is not available for the ZED ROS Wrapper. Please consider migrating to the ZED ROS2 Wrapper if you need it.

    Spatial Mapping

    The Spatial Mapping can be enabled automatically when the node start setting the parameter mapping/mapping_enabled to true in the file common.yaml. The Spatial Mapping can be enabled/disabled manually calling the services start_3d_mapping and stop_3d_mapping.

    Geo Tracking (GNSS Fusion)

    The Geo tracking module is not available for the ZED ROS Wrapper. Please consider migrating to the ZED ROS2 Wrapper if you need it.

    Diagnostic

    The ZED node publishes diagnostic information that can be used by the robotic system using a diagnostic_aggregator node.

    With the rqt plugin Runtime monitor, it is possible to retrieve all the diagnostic information, checking that the node is working as expected.

    2D mode

    For robots moving on a planar surface it is possible to activate the "2D mode" (parameter tracking/two_d_mode in common.yaml). The value of the coordinate Z for odometry and pose will have a fixed value (parameter tracking/fixed_z_value in common.yaml). Roll and pitch and relative velocities will be fixed to zero.

    Examples and Tutorials

    Examples and tutorials are provided to better understand how to use the ZED wrapper and how to integrate it in the ROS framework. See the zed-ros-examples repository

    Examples

    Alongside the wrapper itself and the Rviz display, a few examples are provided to interface the ZED with other ROS packages :

    Tutorials

    A few tutorials are provided to understand how to use the ZED node in the ROS environment :