ros-perception / image_common

Common code for working with images in ROS
http://www.ros.org/wiki/image_common
124 stars 219 forks source link

No synchornization #287

Closed nakai-omer closed 11 months ago

nakai-omer commented 11 months ago

Hello,

Using version 3.1.7 we are getting the following error:

[apriltag_node-19] [WARN] [1695716272.118892884] [apriltag_node]: [image_transport] Topics '/trunk4_camera/image_raw' and '/camera_info' do not appear to be synchronized. In the last 10s:
[apriltag_node-19]  Image messages received:      0
[apriltag_node-19]  CameraInfo messages received: 10
[apriltag_node-19]  Synchronized pairs:           0

The topic is publishing and the image_transport is subscribed as expected:

ros2 topic hz /trunk4_camera/image_raw
average rate: 10.016
        min: 0.096s max: 0.103s std dev: 0.00212s window: 12

When debugging it seems like image callback is not being called in the correct rate, as if the thread doesn't get any priority to run.

nakai-omer commented 11 months ago

Ended up being a QOS mistmatch between gazebo's camera publisher and apriltag_ros. In case anyone else runs into it, you can run:

ros2 topic info -v TOPIC_NAME

And compare the QOS policy between the publisher and subscriber.