stereolabs / zed-ros-wrapper

ROS wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros/
MIT License
447 stars 391 forks source link

rosbag with rtabmap doesn't show up in rviz #880

Closed khuechuong closed 1 year ago

khuechuong commented 1 year ago

Preliminary Checks

Description

So I saved the zed mini data with rosbag. Here's the rosbag info:

types: nav_msgs/Odometry [cd5e73d190d741a2f92e81eda573aca7] sensor_msgs/CameraInfo [c9a58c1b0b154e0e6da7578cb991d214] sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743] sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181] tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec]

topics: /tf 76210 msgs : tf2_msgs/TFMessage
/tf_static 3 msgs : tf2_msgs/TFMessage (3 connections) /zedm/zed_node/depth/camera_info 2824 msgs : sensor_msgs/CameraInfo /zedm/zed_node/depth/depth_registered 2824 msgs : sensor_msgs/Image
/zedm/zed_node/odom 2838 msgs : nav_msgs/Odometry
/zedm/zed_node/point_cloud/cloud_registered 1892 msgs : sensor_msgs/PointCloud2 /zedm/zed_node/rgb/camera_info 5650 msgs : sensor_msgs/CameraInfo /zedm/zed_node/rgb/image_rect_color 2825 msgs : sensor_msgs/Image

Here's my rosbag and rtabmap launch file (I just modified the zed_rtabmap.launch that's already given a little bit):

I've screenshotted what I got. Essentially, while the 3D mapping showed up in rtabmapviz, nothing shows up on rviz. The pointcloud in rviz was just me adding the pointcloud topic /zedm/zed_node/point_cloud/cloud_registered from zedm. The 2 errors I saw is :

[ WARN] [1676406986.150804577]: We cannot estimated the baseline of the rectified images with tf! (zedm_left_camera_optical_frame->zedm_left_camera_optical_frame = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000)

and

[ERROR] (2023-02-14 12:36:26.400) util3d.cpp:1231::cloudRGBFromSensorData() Stereo camera model 0 is invalid

I've checked the TF tree and it looked the same as when I ran the wrapper zedm node. I don't understand why. Any help is appreciated. Thank you!

Screenshot from 2023-02-14 12-36-21

Steps to Reproduce

use rosbag to save topics /tf 76210 msgs : tf2_msgs/TFMessage
/tf_static 3 msgs : tf2_msgs/TFMessage (3 connections) /zedm/zed_node/depth/camera_info 2824 msgs : sensor_msgs/CameraInfo /zedm/zed_node/depth/depth_registered 2824 msgs : sensor_msgs/Image
/zedm/zed_node/odom 2838 msgs : nav_msgs/Odometry
/zedm/zed_node/point_cloud/cloud_registered 1892 msgs : sensor_msgs/PointCloud2 /zedm/zed_node/rgb/camera_info 5650 msgs : sensor_msgs/CameraInfo /zedm/zed_node/rgb/image_rect_color 2825 msgs : sensor_msgs/Image

use launch file:

Expected Result

3D map to show up in rviz and rtabmapviz

Actual Result

3D map only showed up in rtabmapviz.

ZED Camera model

ZED Mini

Environment

Ubuntu 20.04
ROS Noetic

Anything else?

No response

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days