You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to achieve a latching topic through the ros2-web-bridge.
In ROS1 there was a publisher option called latching:
When a connection is latched, the last message published is saved and automatically sent to any future subscribers that connect. This is useful for slow-changing to static data like a map.
This behavior would be very useful for web interfaces where topic driven data might be un-populated when the user first loads or refreshes the page, and remains un-populated until a new message is published.
In ROS2, the behavior can be achieved by using QoS profiles as described here. The trick is to have both the publisher and subscriber use the "transient local" profile. I have achieved this between two rclpy nodes and the latching behavior works. However, this behavior does not seem to work between roslibjs, ros2-web-bridge, and a "transient local" rclpy publisher. I think this is because ros2-web-bridge uses the default QoS policy where the durability is "volatile".
It seems that rclnodejs supports QoS profiles as seen here.
roslibjs does not provide a method to set the QoS policy because the rosbridge v2 protocol does not have a specification for it as someone pointed out in this issue.
I could see two ways of supporting QoS profiles other than the default in ros2-web-bridge:
Providing a configuration file or command line argument for overriding the default QoS profile of the ros2-web-bridge
Adding to section 3.4.4 of the rosbridge v2 protocol to include an optional "qos_profile" field. Then changes could be made to ros2-web-bridge to support QoS profiles on a per subscriber/publisher basis.
The text was updated successfully, but these errors were encountered:
I think the first solution, adding an additional arg, is more feasible because rosbridge v2 protocol is not designed for ROS2 specifically. Of course, the ideal way is that it can be supported by the rosbridge protocol, then each connection could customize its own QoS profile.
I am trying to achieve a latching topic through the ros2-web-bridge.
In ROS1 there was a publisher option called latching:
This behavior would be very useful for web interfaces where topic driven data might be un-populated when the user first loads or refreshes the page, and remains un-populated until a new message is published.
In ROS2, the behavior can be achieved by using QoS profiles as described here. The trick is to have both the publisher and subscriber use the "transient local" profile. I have achieved this between two rclpy nodes and the latching behavior works. However, this behavior does not seem to work between roslibjs, ros2-web-bridge, and a "transient local" rclpy publisher. I think this is because ros2-web-bridge uses the default QoS policy where the durability is "volatile".
It seems that rclnodejs supports QoS profiles as seen here.
roslibjs does not provide a method to set the QoS policy because the rosbridge v2 protocol does not have a specification for it as someone pointed out in this issue.
I could see two ways of supporting QoS profiles other than the default in ros2-web-bridge:
The text was updated successfully, but these errors were encountered: