christian-rauch / rgbd_export

Synchronised export of compressed RGB and Depth images and joint states from rosbag file.
12 stars 1 forks source link

No messages received #1

Open hoonkai opened 5 years ago

hoonkai commented 5 years ago

Hi

Great work there! I'm trying to get it to work with a simple rosbag file I made, but I keep getting the error no message is received:

$ rosrun rgbd_export rgbd_sync_export.py   ~/test2.bag   ~/export   --topic_rgb /camera/rgb/image_raw   --topic_depth /camera/depth_registered/image_raw   --topic_camera_info /camera/rgb/camera_info

reading: /home/mwell/test2.bag
duration: 4.97503685951 s
exporting to: /home/mwell/Downloads/test_extract/export
Ignoring joint topic.
NO colour images. Check that topic '/camera/rgb/image_raw' is present in bag file!
NO depth images. Check that topic '/camera/depth_registered/image_raw' is present in bag file!
Found no messages on any of the given topics.
Valid topics are: ['camera/depth_registered/image_raw', 'tf_static']
Given topics are: ['/camera/rgb/image_raw', '/camera/depth_registered/image_raw', '/camera/rgb/camera_info', '/joint_states']
Traceback (most recent call last):
  File "/home/mwell/catkin_ws/src/rgbd_export/src/rgbd_sync_export.py", line 281, in <module>
    RGBDExporter().export()
  File "/home/mwell/catkin_ws/src/rgbd_export/src/rgbd_sync_export.py", line 143, in export
    raise Exception("No CameraInfo message received!")
Exception: No CameraInfo message received!

This bag publishes tf_static rather than tf though. Any idea why this is happening?

Thanks

hoonkai commented 5 years ago

Here's some info on the rosbag file:

path:        test2.bag
version:     2.0
duration:    5.0s
start:       Sep 17 2019 03:48:43.16 (1568656123.16)
end:         Sep 17 2019 03:48:48.14 (1568656128.14)
size:        246.3 MB
messages:    484
compression: none [241/241 chunks]
types:       sensor_msgs/CameraInfo [c9a58c1b0b154e0e6da7578cb991d214]
             sensor_msgs/Image      [060021388200f6f0f447d0fcd9c64743]
             tf2_msgs/TFMessage     [94810edda583a504dfda3829e70d7eec]
topics:      camera/depth_registered/camera_info   120 msgs    : sensor_msgs/CameraInfo
             camera/depth_registered/image_raw     120 msgs    : sensor_msgs/Image     
             camera/rgb/camera_info                120 msgs    : sensor_msgs/CameraInfo
             camera/rgb/image_raw                  120 msgs    : sensor_msgs/Image     
             tf_static                               4 msgs    : tf2_msgs/TFMessage     (4 connections)
christian-rauch commented 4 years ago

Sorry, I missed that issue. Seems I never got a notification for it.

I cannot download the example bag file anymore. But from the topic names, it looks like that your bag file does not have the leading slash, e.g. your bag image topic is camera/rgb/image_raw, while your ask for /camera/rgb/image_raw as the command line parameter.

Does rosrun rgbd_export rgbd_sync_export.py ~/test2.bag ~/export --topic_rgb camera/rgb/image_raw --topic_depth camera/depth_registered/image_raw --topic_camera_info camera/rgb/camera_info (i.e. without the leading '/') work in your case?