Repository navigation
v5.6.0
New Features
- Added the `~/reboot_camera` service (`std_srvs/srv/Trigger`, stereo and mono) to reboot a live camera without restarting the node: the node closes the camera, reboots it, reopens it and resumes publishing. The call returns when the camera is back, after 5 to 15 s. Available for the GMSL cameras, the ZED 2 and the ZED 2i, not with SVO, streaming or simulation input, nor with GNSS fusion enabled. The positional tracking restarts from the last valid pose (with `pos_tracking.floor_alignment`, the floor is not searched again because that pose is already aligned to it), object detection, body tracking, spatial mapping, the streaming server and the Region of Interest are enabled again, and an active SVO recording is stopped. The other GMSL cameras of the device can stop for a few seconds. If the camera does not come back within `general.camera_timeout_sec` x `general.camera_max_reconnect` seconds, the call fails and the node stops, as after a disconnection. The diagnostic reports the reboot in progress and, in the new `Reboots` entry, the number of reboots with the time and result of the last one.
- Full Isaac ROS integration with `rosidl::Buffer` support and CUDA zero-copy transport (ROS 2 Lyrical and newer, stereo and mono):
- The images, depth maps, confidence maps and point clouds stay in GPU memory and are shared without copies with the subscribers on the same host and GPU that accept the `cuda` `rosidl::Buffer` backend.
- All the other subscribers (RViz2, `ros2 bag`, Python nodes, other hosts, intra-process subscribers, compressed transports) automatically receive the standard CPU data, with no change on their side.
- Enabled by default with the new `general.buffer_backend` parameter (`cuda` default, `cpu`). The node falls back to CPU, with a log message, when the `cuda_buffer` and `cuda_buffer_backend` packages are not installed or the RMW does not support buffer backends: `rmw_fastrtps_cpp` and `rmw_zenoh_cpp` v0.10.5 or newer are supported.
- The topics published with NITROS are unchanged.
- Measured with a ZED 2i (HD720 @ 60 FPS) on an AGX Thor: point cloud received at 10 Hz instead of 4-6 Hz by a CUDA subscriber in another process, image publishing with 7-22% less CPU and ~2 ms less latency. CPU-only subscribers are not affected.
- Added the motion prior to the positional tracking (`pos_tracking.motion_prior.*` parameters): the stereo node subscribes to a `nav_msgs/Odometry` topic, such as wheel odometry, and sends its motion to the `GEN_3` positional tracking, which then stays accurate in fast motion, low texture or occlusions, and follows the motion source while the images cannot be used. Its status is shown in the diagnostic. Requires ZED SDK >= 5.6.
- Added the `~/pose/motion_prior_links` topic (`visualization_msgs/Marker`), published while the motion prior is enabled: one segment between the two keyframes of each link the motion prior holds, green when used, yellow when deferred, red when rejected. Requires ZED SDK >= 5.6.
- Added the `tracking_fusion_status` and `motion_prior_status` fields to the `PosTrackStatus` message published on `~/pose/status`. Requires `zed_msgs` v5.6 (and ZED SDK >= 5.6 for `motion_prior_status`); with an older `zed_msgs` the node runs as before, without the fields.
- Added the `NEURAL_MAX` value to `depth.depth_mode`: the most accurate NEURAL depth mode, for high-end GPUs such as Jetson AGX Thor or for offline SVO processing. Requires ZED SDK >= 5.6.
- Added the `depth.depth_compute_device` parameter (`AUTO` default, `GPU`, `DLA`, `PVA`, experimental) to run the `NEURAL_LIGHT` depth on an accelerator of the Jetson and leave the GPU to the application. The diagnostic shows the selected device, or `GPU` when the ZED SDK runs the depth on the GPU instead, at start-up or during the session, and a warning says so. Requires ZED SDK >= 5.6.
- Added the `depth.publish_depth_image` parameter (default `false`) to publish the colorized depth visualization on `~/image/depth_image`, separate from the depth measurement published on `~/depth/depth_registered`. Like the other image topics, it follows `video.enable_24bit_output`, and it is only advertised if enabled and only published while a node subscribes to it.
- Added the `sensors.imu_sampling_rate`, `sensors.imu_accelerometer_range` and `sensors.imu_gyroscope_range` parameters (stereo and mono) to select a 400 Hz IMU and the IMU ranges on ZED X family cameras. The values in use are logged at start-up. Requires ZED SDK >= 5.6 and ZED X driver >= 1.5.0.
- Added the `-1` value to `video.exposure_compensation` and `video.ae_antibanding` (stereo and mono): the node does not set the setting and the camera keeps its own value. It is the default in `virtual.yaml`. ZED SDK 5.6 also fixes these settings being refused by the ZED X Mini and ZED X One, which made the node warn at every start.
- Added the `general.sync_pub_to_timestamp` parameter (stereo and mono, default `false`) for GMSL cameras connected to the same capture card: the frames to publish are selected on their image timestamp instead of each node's publishing timer, so with `general.pub_frame_rate` lower than `general.grab_frame_rate` all the cameras publish the frames captured at the same instant, ZED X and ZED X One cameras together. In the stereo node the point cloud then follows `general.pub_frame_rate`, `general.grab_compute_capping_fps` is ignored, and the depth is computed only for the published frames when no other module needs it. Thanks to @khaterma (#447).
- Added the `general.exit_on_failure` parameter (stereo and mono) to choose what happens when a node fails for good (camera that cannot be opened or that does not come back, invalid configuration, critical camera error): `true` stops the whole process, so that the launch ends and a supervisor can restart it; `false` stops this node only, and the other nodes of its container keep running. `zed_camera.launch.py` sets it to `true` when it creates the container and to `false` when the node is loaded in an existing container (`container_name`, as `zed_multi_camera.launch.py` does). The default value, used for example with `ros2 component load`, is `false`. A stopped node reports the reason in its diagnostic and can be unloaded with `ros2 component unload`.
- Added the `general.pub_frame_rate` parameter to the mono node (default `0.0`, publish every grabbed frame as before) to publish the images at a lower rate than `general.grab_frame_rate`.
Upgrades
~~~~~~~~
- Reduced the CPU usage of both nodes:
- The sensors data are no longer read at the IMU rate when no node subscribes to the sensors topics.
- The images, depth maps and disparity maps are copied only when they are published both raw and compressed, and the deprecated `~/disparity/disparity_image` topic is filled only when a node subscribes to it.
- With intra-process communication, the images are copied only for the subscribers in the same process.
- The mono node no longer subscribes to `/tf` and `/tf_static`.
- Repeated errors in the data threads are logged at most once per second.
- Measured with the container CPU usage, in % of a CPU core. AGX Orin with a ZED X (HD1200 @ 30 FPS): 37% instead of 40% with no subscriber, 115% instead of 130% with the color image, the depth map and the side-by-side image subscribed by another process. AGX Thor with a ZED 2i (HD720 @ 30 FPS): 18% instead of 24% with no subscriber; no measurable change with the same subscribers.
- Raised the minimum ZED SDK version to v5.0.7 (was v4.2): the build stops with a CMake error when an older version is installed.
- Changed how both nodes handle a camera disconnected while running: they wait `general.camera_timeout_sec` x `general.camera_max_reconnect` seconds (25 by default) for it to come back, then stop, as described for `general.exit_on_failure`. Previously they waited forever while the ZED SDK was reopening the camera, and were killed when it reported the camera as not detected. Both parameters are now also available in `common_mono.yaml`.
- The mono node now retries to open the camera at start-up every `general.camera_timeout_sec` seconds, for `general.camera_timeout_sec` x `general.camera_max_reconnect` seconds, as the stereo node does. Previously it stopped at the first failure, for example when another node of the same device was opening its camera at the same time.
- Added the camera disconnections to the diagnostic (stereo and mono): while the camera is disconnected the status reports how long the node has been waiting, and the new `Disconnections` entry counts the disconnections of the session with the time of the last reconnection.
- Changed `zed_camera.launch.py` and `zed_camera_debug.launch.py` to stop the whole launch (including `robot_state_publisher`) when the ZED node exits, so `ros2 launch` returns and a supervisor can restart it.
- The stereo node now stops with a clear error when the AI model of `depth.depth_mode` is missing and cannot be downloaded, instead of retrying forever and asking to check the camera connection. Requires ZED SDK >= 5.6.
- GNSS fusion now also runs with `depth.depth_mode: 'NONE'` and `GEN_3`, which saves the depth computation. Requires ZED SDK >= 5.6; with older versions the node disables GNSS fusion with a warning instead of failing silently.
- Note for the upgrade to ZED SDK 5.6: with `GEN_3`, the area files saved by the node (`pos_tracking.save_area_memory_on_closing`, `save_area_memory` service) can no longer be loaded by ZED SDK 5.5 or older, and an older file is converted when saved again. Keep a copy if an older ZED SDK still needs it.
- Removed the stereo node warning about `depth.depth_precision: 'INT8'` with ZED SDK >= 5.6: every NEURAL depth mode now has an INT8 model, and the ZED SDK itself warns when the depth mode or the GPU cannot use it.
- Changed the stereo node to refuse `depth.depth_mode: 'CUSTOM'` (depth provided by the application), which the ROS 2 Wrapper does not support: it now warns and uses `NEURAL`.
- Changed both nodes to report a video setting refused by the camera or the input (unsupported setting or refused value) once, naming the node parameter, instead of retrying it: the mono node retried it at every frame, the stereo node 20 times. Requires ZED SDK >= 5.6, which reports these errors.
- Changed both nodes to send the video parameters (`video.*`, also when changed at runtime) to a simulated camera, which applies the ones the simulator supports; the others are reported once and ignored. Previously the video parameters were ignored in simulation. Requires ZED SDK >= 5.6.
- Added the `simulation.self_calib` parameter (default `false`): in simulation it replaces `general.self_calib`, so the self-calibration is now disabled by default with a simulated camera, for reproducible results. Set it to `true` to restore the previous behavior.
- Added to the Docker README the `--ulimit rtprio=5` option for GMSL cameras, which lets ZED SDK >= 5.6 with ZED X driver >= 1.5.0 run the camera capture and sensors threads with real-time priority. The `advanced.*` comments now state the system requirements of `SCHED_FIFO` and `SCHED_RR`, and warn that higher node priorities can delay the camera capture.
- Changed the default camera configurations to match the camera specifications: `zedxone4k.yaml` now uses `HD1200` at 30 FPS (`QHDPLUS` only runs at 15 FPS and only in HDR mode, so the previous default could not run as configured), `zed2i.yaml` runs at 30 FPS like the other USB cameras (was 60 FPS), `zedxnano.yaml` limits `depth.max_depth` to 3 m, the range of the camera (was 5 m), and `zedxm.yaml` and `zedxnano.yaml` use the same manual exposure and gain values as `zedx.yaml` (`video.exposure_time: 16000`, `video.auto_exposure_time_range_max: 30000`, `video.analog_gain: 1255`, `video.digital_gain: 1`).
- Removed the `urdf` folder: the camera models now belong to the `zed_description` package.
Bug fixes
~~~~~~~~~
- Fixed the mono node crashing (memory corruption) when the `set_svo_frame` service is called while an SVO is playing.
- Fixed the "System overloaded" diagnostic warning never being reported (stereo and mono): it is now reported when the processing is more than 10% slower than the grab rate for 10 consecutive diagnostic updates.
- Fixed a ZED node that cannot open its camera, or that has an invalid configuration or a critical camera error, stopping every other node of its component container, usually with a crash: the cameras of the other nodes stopped publishing (stereo and mono). The node now stops alone, or stops the whole process cleanly when `general.exit_on_failure` is `true`. A node that cannot be created (unsupported ZED SDK version) now makes `ros2 component load` report the failure instead of ending the container.
- Fixed a possible crash when stopping a container from which a ZED node had been unloaded with `ros2 component unload` (stereo and mono).
- Fixed the mono node possibly never applying a video setting that was still waiting to be applied when another parameter, such as `sensors.sensors_pub_rate`, was changed.
- Fixed the build with ZED SDK 5.0 and 5.1: with these versions the `virtual` camera model (ZED SDK >= 5.1), `pos_tracking.enable_localization_only` (ZED SDK >= 5.1) and the custom object detection tracking parameters (ZED SDK >= 5.2) are not available, and the IMU of an SVO or a simulated camera is read at the camera frame rate.
- Fixed the positional tracking never starting with `depth.depth_mode: 'NONE'` and `pos_tracking.pos_tracking_mode: 'GEN_3'`, a combination supported since ZED SDK 5.2: it now starts, and with another tracking mode the node says why it is disabled.
- Fixed the positional tracking failing to start with ZED SDK 5.6 when `pos_tracking.area_file_path` is set and `pos_tracking.area_memory` is `false`: the file is now ignored with a warning, as older ZED SDK versions did.
- Fixed GNSS fusion with `GEN_3` flooding the log: the Area Memory (loop closure), which cannot be combined with GNSS fusion, is now really disabled, and the GNSS fusion status and reference initialization are logged on change only instead of at every frame.
- Fixed the deprecated `status` field of `PosTrackStatus` on `~/pose/status`, which was always published as `0` (read as `SEARCHING`) since the GEN_3 status fields were introduced. It now carries the positional tracking state returned by the ZED SDK (`SEARCHING`, `OK`, `OFF`, `FPS_TOO_LOW`, `SEARCHING_FLOOR_PLANE`, `UNAVAILABLE`) for code still relying on it. New code should use `odometry_status` and `spatial_memory_status`.
- Fixed `pose_confidence` on `~/pose/status` being able to wrap around in the `uint8` field: the value is now clamped to the documented [0,100] range.
- Fixed `~/imu/data_raw` (stereo and mono) not flagging its missing orientation as REP-145 requires: `orientation_covariance[0]` is now `-1`, so consumers such as `robot_localization` ignore the orientation field instead of reading the all-zero covariance as an exactly known orientation.
- Fixed the stereo node aborting with `can't compare times with different time sources` when `sensors.sensors_image_sync` is enabled on a non-ZED camera model: the exception took down the component container.
- Fixed a USB camera plugged back more than 10 seconds after a disconnection never resuming: the ZED SDK now keeps trying to reopen it for as long as the node waits for it.
- Fixed both nodes retrying to open a camera that the ZED SDK had already opened with a warning (such as `CONFIGURATION_FALLBACK`): the node now logs the warning and starts.
- Fixed `optical_offset_x` for the different camera models.
- Fixed SVO recordings started with `start_svo_rec` being empty with ZED SDK versions older than 5.4 when neither depth nor positional tracking is required (e.g. `depth.depth_mode: 'NONE'`): the node now grabs the frames while recording, without computing depth. With ZED SDK 5.4 and newer the recording was already correct. Thanks to @Parv-Maheshwari (#461).
- Fixed the positional tracking never starting when the ZED SDK enables it with a warning, such as `SENSORS_DATA_REQUIRED` with `GEN_3` and `pos_tracking.imu_fusion: true` on an input without high-frequency IMU data (a network stream or Isaac Sim): the node logged `Pos. Tracking not started` and retried, while the ZED SDK was tracking with the integrated orientation as rotation prior. The node now logs the warning and uses the positional tracking. Thanks to @akashshingha850 (#463).
- Fixed the stereo node flooding the log with `sl::getSensorsData error` warnings (about 100 per second) when the input does not provide the IMU data at the sensor rate, such as an SVO v1: the sensors thread now stops with a single warning, which suggests `sensors.sensors_image_sync: true` to publish the IMU data at the camera frame rate. The same applies to an input without IMU. The temperatures are now read with the image timestamp, which every input provides, so their warning at every second is also gone.
- Fixed the stereo node publishing the camera info topics at the grab rate instead of `general.pub_frame_rate` while no node subscribes to the images or to the depth.
- Fixed both nodes aborting, together with their container, when a parameter value set in a YAML file or in a launch override is out of range or of the wrong type (for example `5` instead of `5.0`, or `[0, 0, 0, 0, 0, 0]` for `pos_tracking.initial_base_pose`): the node now warns and uses a valid value instead: a number of the other numeric type is converted (`5` for `5.0`, `6.6` rounded to `7` for an integer), an out-of-range value is replaced by the nearest limit, and any other wrong value by the default value.
- Fixed the mono node accepting `general.grab_resolution: 'SVGA'` with a ZED X One 4K, which does not support it, so the camera failed to open: the node now warns and uses `AUTO`.
- Fixed the stereo node reporting `CAMERA NOT DETECTED` when `general.serial_number` is the serial number of a connected ZED X One. The node now stops at once with an error that names the ZED X One model and the `camera_model` value that starts the mono node.
- Fixed the mono node retrying for `general.camera_timeout_sec` x `general.camera_max_reconnect` seconds with `MODULE NOT COMPATIBLE WITH SELECTED CAMERA` when `general.serial_number` is the serial number of a connected stereo camera. The node now stops at once with an error that names the stereo camera model and the `camera_model` value that starts the stereo node.
- Fixed the stereo node not saying that it retries while waiting for a camera: it now logs `Error opening camera: <error>. Retrying in <N> sec...`, like the mono node.
- Fixed the mono node sending video settings that the camera does not have in its current mode, such as `video.gamma` on a ZED X One 4K with `video.enable_hdr: true`: they are no longer sent, so the node no longer warns about them.
- Fixed a looping SVO (`svo.svo_loop: true`) starting the positional tracking at the end of the recording when it is disabled. The node restarted the tracking to reset the pose, and without a `robot_state_publisher` providing the camera transforms (for instance the component composed in another application) it stopped publishing. The pose is now reset only when the positional tracking is running.
- Fixed the stereo node waiting 2.8 hours instead of 10 seconds for the camera static transforms when it starts the positional tracking and no node publishes them (no `robot_state_publisher`, for example `publish_urdf:=false` or the component composed in another application): the node published nothing and did not stop on Ctrl+C. The node now waits 10 seconds, measured in real time (also with `use_sim_time` while `/clock` is not published), and stops waiting at once when it is shut down or unloaded. After the timeout it warns and starts the positional tracking without the transform to the base frame (`<camera_name>_camera_link`): the pose and the odometry are then the ones of the camera center, `~/odom` carries `<camera_name>_camera_center` as `child_frame_id`, and the `odom` -> `<camera_name>_camera_link` TF is not published. As soon as the transform is available, the pose and the odometry move to the base frame without a jump of the camera position and the TF is published.