ros-perception / image_common

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

[ROS2] The Image frame rate half of the CameraInfo frame rate #176

Open b4795 opened 4 years ago

b4795 commented 4 years ago

Steps to reproduce:

Publish Image and CameraInfo using CameraPublisher.

Observed & Expected:

Image frame rate (as measured by ros2 topic hz) is around 8. Expected: equal to the CameraInfo frame rate. CameraInfo frame rate (as measured by ros2 topic hz) is around 16. Expected: equal to the Image frame rate.

Questions:

Could it be that any other Image fails to be published? Could it be an issue with ros2 topic hz?

EwingKang commented 11 months ago

I've also encountered this issue. Check this issue: https://github.com/ros2/ros2cli/issues/871 I workaround it by modifying the QoS setting directly in the installed location /opt/ros/iron/lib/python3.10/site-packages/ros2topic/verb/hz.py. By changing the qos profile line to rclpy.qos.qos_profile_parameters, it is possible for ros2 topic hz to report correct frequency.