-
Notifications
You must be signed in to change notification settings - Fork 72
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
[ROS2] QOS profile options and subscribing problem #187
Comments
Hi, I encounter the same kind of problem here. System: Description: |
Hi, I also have same issue.
Add topic Description:
As @anaelle-sw mentioned, it's same on Thanks. |
Any idea on how to fix it? @dirk-thomas |
Imo the options are:
|
FWIW, as of ROS Galactic, there exists a feature to enable configuration QoS with ROS parameters: I suggest we enable this feature for rqt plugins. |
I know Quality of Service can be confusing to some people, so in case you run into an issue of not being able to have your nodes subscribe to Gazebo plugin publishers, you can use the To configure QoS properly in Python, for example in a subscriber, you can use the following: qos_policy = rclpy.qos.QoSProfile(reliability=rclpy.qos.ReliabilityPolicy.BEST_EFFORT,
history=rclpy.qos.HistoryPolicy.KEEP_LAST,
depth=1)
self.sub = self.create_subscription(Image, topic,
self.subscriber_callback, qos_profile=qos_policy) The above is a subscriber I made to retrieve images from my gazebo simulation using the Hopefully this helps someone else down the line. |
This issue still persists today, e.g. with galactic. When trying to use the most straightforward combination of a Gazebo camera plugin (libgazebo_ros_camera.so) and rqt image view, one will not see the camera images, rather one will get the following message from rqt:
I'd consider that there is something broken in the ROS2 ecosystem, if this simple use case doesn't work. Likely two things are required to fix this:
Edit: Just realized that this effects all rqt plugins, even general-purpose ones such as Topic Monitor ... this is really unpleasant. |
Updated link: https://docs.ros.org/en/foxy/Releases/Release-Galactic-Geochelone.html#externally-configure-qos-at-start-up I had thought that this feature can be used to change the QoS of every node after startup – I was wrong. As @jacobperron pointed out, it has to be enabled:
I also looked if QoS of Another workaround could be to republish the topic with the suitable QoS setting for I hope that this problem is ultimately resolved by automatically setting the QoS setting of the consumer. As far as I remember this is not wanted by design though and ROS enforces the developer to think about QoS. At least in case of The straightforward and easy approach is to make |
FWIW, I think you can reconfigure all of the default gazebo_ros plugins via XML (in the URDF/SDF) since Foxy. Here is a link to some documentation: Another option is to dynamically select the QoS based on the publisher. Here is a related issue to add a common API to support such a feature in ROS 2: ros2/rclcpp#1868 |
Thanks for the hint, @jacobperron I added the <plugin name="camera_plugin" filename="libgazebo_ros_camera.so">
<ros>
<namespace>camera</namespace>
<qos>
<topic name="/camera/${side}/image_raw">
<publisher>
<reliability>reliable</reliability>
</publisher>
</topic>
</qos>
</ros>
<camera_name>${side}</camera_name>
<frame_name>camera_${side}_link_optical</frame_name>
<hack_baseline>0.2</hack_baseline>
</plugin> It solved the qos compatibility problem with rqt. |
I just noticed that even if we enable the QoS overrides feature, we won't actually be able to use it for C++ plugins since we're not parsing CLI arguments (#262). |
This issue was opened on beginning of 2019, we have almost 2024 and still no resolution? Any updates? |
This issue has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/new-rep-2003-sensor-data-and-map-qos-settings/35758/10 |
Pretty sure it has been fixed by images being subscribed as BEST_EFFORT now. |
I'm testing RQT on ROS2 Crystal Clemmys and I noticed that I cannot subscribe image topics using the
rqt_image_view
plugin.The problem is due to QOS settings since I'm not publishing the Image topics using the default values:
https://index.ros.org/doc/ros2/Concepts/About-Quality-of-Service-Settings/#qos-compatibilities
I think that each GUI plugin should provide a way to set the QoS setting to be used for each topic that can be subscribed.
The text was updated successfully, but these errors were encountered: