Add qos parameters to ros2 topic hz
Feature description
Currently, the ros2 topic hz verb does not allow the user to specify qos settings.
We had a case where ros2 topic hz did not report the expected frequency. In this case, 12 messages was published at a burst at 10 Hz (resulting in an expected frequency of 120 Hz). The hz verb uses the sensor_data qos profile, which has a queue depth of 5. This caused messags to be dropped, and ros2 topic hz only reporting about 70-80 Hz. Setting up a separate subscriber with a queue depth > 12 we received all the messages.
It would be very nice to be able to specify the qos settings in a similar way as e.g. ros2 topic echo.
Implementation considerations
This could probably be implemented in a similar way as for the other ros2 topic verbs?
Yeah, that would be a fine feature to have. Please consider submitting a pull request implementing this.