Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recording of images fails #201

Closed
teutobod opened this issue Nov 8, 2019 · 4 comments
Closed

Recording of images fails #201

teutobod opened this issue Nov 8, 2019 · 4 comments

Comments

@teutobod
Copy link

teutobod commented Nov 8, 2019

I'm publishing image data from my webcam using:
ros2 run image_tools cam2image (link)

The images are published to a topic of type:
sensor_msgs/msg/Image

Then I start recording using:
ros2 bag record /image
[INFO] [rosbag2_storage]: Opened database 'rosbag2_2019_11_08-16_48_23'.
[INFO] [rosbag2_transport]: Listening for topics...
[INFO] [rosbag2_transport]: Subscribed to topic '/image'
[INFO] [rosbag2_transport]: All requested topics are subscribed. Stopping discovery...

But finally the recorded bag is empty!
ros2 bag info rosbag2_2019_11_08-16_48_23/
Files: rosbag2_2019_11_08-16_48_23.db3
Bag size: 16.3 KiB
Storage id: sqlite3
Duration: 0.0s
Start: Jan 1 1970 01:00:00.0 (0.0)
End Jan 1 1970 01:00:00.0 (0.0)
Messages: 0
Topic information:

System: Ubuntu 18.04.3 LTS
ROS2 Release: Eloquent

@Karsten1987
Copy link
Collaborator

Could that be related to #125? Can you verify with which QoS you're sending the images? If the topics are sent reliably, I would assume the topics being correctly recorded. However, when you send images via unreliable QoS rosbag2 currently can't record this.

@peterchen25
Copy link

peterchen25 commented Nov 11, 2019

According to here the default qos of this demo in "reliable"

@Karsten1987
Copy link
Collaborator

I think that wasn't actually accurate and just got fixed.

With that fix - sending images reliably - I am able to record images:

 ➭ ros2 bag info rosbag2_2019_11_11-17_01_24/

Files:             rosbag2_2019_11_11-17_01_24.db3
Bag size:          59.3 MiB
Storage id:        sqlite3
Duration:          8.838s
Start:             Nov 11 2019 17:01:24.791 (1573520484.791)
End                Nov 11 2019 17:01:33.629 (1573520493.629)
Messages:          269
Topic information: Topic: /image | Type: sensor_msgs/msg/Image | Count: 269 | Serialization Format: cdr

@teutobod
Copy link
Author

Thanks for the update Karsten. Works now for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants