"[ZED][ERROR] [Mat] Mat type currently not supported" Error

I am running the ROS 2 ZED SDK wrapper and getting the following error:

[ZED][ERROR] [Mat] Mat type currently not supported

I have been using the the ROS 2 wrapper for a while and this error has only showed up recently for me. I am running 4 cameras on Ubuntu 22.04 with SDK version 4.0.

My question is what does this error signal? I am still able to capture images from the cameras, but it does seem like they are using a lot more CPU and memory.

Hi @scheideman
Welcome to the Stereolabs community.
Did you recently upgrade the SDK?
Try to delete the build and install folders of your devel ROS2 workspace to clean the cache of CMake and then recompile.

Hey @Myzhar , thank you for the welcome.

I upgraded to 4.0 at the beginning of May. I tried cleaning the ROS workspace, but it did not stop the error.

I did some more debugging today. It turns out I see this error when I am recording bag files. Specifically if I record depth images from {CAMERA_NAMESPACE}/depth/depth_registered topic.

@scheideman in that case that’s not a ROS Wrapper error, but a rosbag problem.
I must test it to understand the cause.
Can you provide more detail regarding your configuration and the commands that you use to start all the nodes? Included the command to start recording.

@Myzhar for sure I can provide more details. Thanks for following up.

I am running 4 ZED2i. I have a custom launch file but it is very similar to the one used in this tutorial (zed-ros2-examples/tutorials/zed_multi_camera at master · stereolabs/zed-ros2-examples · GitHub). I am using NEURAL depth, 1080p resolution, 15 FPS publish rate. Features like depth stabilization, position tracking, object detection, map fusion are turned off.

For bag recording I am using mcap for the storage plugin. And I am recording the compressed rectified image and depth image from each camera. For example:

ros2 bag record -s mcap {CAMERA_NAMESPACE}/depth/depth_registered {CAMERA_NAMESPACE}/left/image_rect_color/compressed

Can you provide the log before and after this message?
It’s a ZED SDK warning, but it’s not easy to understand what part of the ZED Component generates it from the information that you provided.

Also provide your config file in order to replicate the same running

I am having trouble reproducing the error using a basic setup. At the moment it seem like the only way I can reproduce the error is if I am running my launch file using a systemd service and recording depth images in the bag file.

When you run the launch file as a systems service your user is promoted to root, so the ZED SDK can have unexpected behaviors if the environment is not correctly setup.
Are you sure that your software can correctly access the GPU resources and the ZED SDK folder?

Okay, I will explore this direction some more. I am able to launch the cameras and capture images using zed wrapper ran using a systemd service, but I will have to double check all the permissions.