Skip to content
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

Rosbridge blocks subscriptions to a topic if it subscribes before the subscription is available. #769

Open
johncarl81 opened this issue Aug 1, 2022 · 9 comments
Labels

Comments

@johncarl81
Copy link

johncarl81 commented Aug 1, 2022

Description

When I start rosbridge and subscribe to a topic before the topic is available I receive the following error:

[rosbridge_websocket]: New publisher discovered on topic '/mavros/local_position/pose', offering incompatible QoS. No messages will be received from it. Last incompatible policy: RELIABILITY

and subsequent attempts to connect via rosbridge to the given topic don't return anything.

  • Library Version: 1.2.0-1focal.20220520.222649
  • ROS Version: galactic
  • Platform / OS: Docker - Ubuntu 20.04

Steps To Reproduce

  1. Startup ros
ros2 daemon start
  1. Startup rosbridge:
ros2 launch rosbridge_server rosbridge_websocket_launch.xml &
  1. Subscribe to a stream that hasn't been started yet via ros (in this case a mavros stream):
    (not sure of the exact syntax here):
    subscribe to /mavros/global_position/global

  2. Start said stream

  3. Received error:

[rosbridge_websocket]: New publisher discovered on topic '/mavros/local_position/pose', offering incompatible QoS. No messages will be received from it. Last incompatible policy: RELIABILITY

Expected Behavior

I'd expect the subscription to be either configurable or more graceful in subscribing to this sort of stream.

Actual Behavior

In essence, rosbridge blocks itself from ever subscribing to a stream if rosbridge attempts to subscribe to it before it's available. This block is in place for as long as rosbridge is continuously running.

More Info

Here's topic info for when rosbridge subscribes to the stream first:
Note the Reliability: BEST_EFFORT under rosbridge_websocket

ros2 topic info /mavros/global_position/global --verbose
Type: sensor_msgs/msg/NavSatFix

Publisher count: 1

Node name: global_position
Node namespace: /mavros
Topic type: sensor_msgs/msg/NavSatFix
Endpoint type: PUBLISHER
GID: b1.c4.10.01.32.d2.84.30.93.77.00.75.00.01.67.03.00.00.00.00.00.00.00.00
QoS profile:
Reliability: BEST_EFFORT
Durability: VOLATILE
Lifespan: 9223372036854775807 nanoseconds
Deadline: 9223372036854775807 nanoseconds
Liveliness: AUTOMATIC
Liveliness lease duration: 9223372036854775807 nanoseconds

Subscription count: 3

Node name: rosbridge_websocket
Node namespace: /
Topic type: sensor_msgs/msg/NavSatFix
Endpoint type: SUBSCRIPTION
GID: 59.28.10.01.81.5a.c3.9d.d1.8f.86.4a.00.00.18.04.00.00.00.00.00.00.00.00
QoS profile:
Reliability: BEST_EFFORT
Durability: VOLATILE
Lifespan: 9223372036854775807 nanoseconds
Deadline: 9223372036854775807 nanoseconds
Liveliness: AUTOMATIC
Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: setpoint_position
Node namespace: /mavros
Topic type: sensor_msgs/msg/NavSatFix
Endpoint type: SUBSCRIPTION
GID: b1.c4.10.01.32.d2.84.30.93.77.00.75.00.03.4d.04.00.00.00.00.00.00.00.00
QoS profile:
Reliability: BEST_EFFORT
Durability: VOLATILE
Lifespan: 9223372036854775807 nanoseconds
Deadline: 9223372036854775807 nanoseconds
Liveliness: AUTOMATIC
Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: uav_remote_service
Node namespace: /
Topic type: sensor_msgs/msg/NavSatFix
Endpoint type: SUBSCRIPTION
GID: f6.00.10.01.75.04.cb.e9.95.a3.b3.32.00.00.20.04.00.00.00.00.00.00.00.00
QoS profile:
Reliability: BEST_EFFORT
Durability: VOLATILE
Lifespan: 9223372036854775807 nanoseconds
Deadline: 9223372036854775807 nanoseconds
Liveliness: AUTOMATIC
Liveliness lease duration: 9223372036854775807 nanoseconds

And here's a topic info for when rosbridge subscribes to the stream first:
Note the Reliability: RELIABLE under rosbridge_websocket

ros2 topic info /mavros/global_position/global --verbose
Type: sensor_msgs/msg/NavSatFix

Publisher count: 1

Node name: global_position
Node namespace: /mavros
Topic type: sensor_msgs/msg/NavSatFix
Endpoint type: PUBLISHER
GID: 99.ff.10.01.de.e2.09.af.e5.5d.35.82.00.01.67.03.00.00.00.00.00.00.00.00
QoS profile:
Reliability: BEST_EFFORT
Durability: VOLATILE
Lifespan: 9223372036854775807 nanoseconds
Deadline: 9223372036854775807 nanoseconds
Liveliness: AUTOMATIC
Liveliness lease duration: 9223372036854775807 nanoseconds

Subscription count: 3

Node name: rosbridge_websocket
Node namespace: /
Topic type: sensor_msgs/msg/NavSatFix
Endpoint type: SUBSCRIPTION
GID: 59.28.10.01.81.5a.c3.9d.d1.8f.86.4a.00.00.1c.04.00.00.00.00.00.00.00.00
QoS profile:
Reliability: RELIABLE
Durability: VOLATILE
Lifespan: 9223372036854775807 nanoseconds
Deadline: 9223372036854775807 nanoseconds
Liveliness: AUTOMATIC
Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: NODE_NAME_UNKNOWN
Node namespace: NODE_NAMESPACE_UNKNOWN
Topic type: sensor_msgs/msg/NavSatFix
Endpoint type: SUBSCRIPTION
GID: 99.ff.10.01.de.e2.09.af.e5.5d.35.82.00.03.4d.04.00.00.00.00.00.00.00.00
QoS profile:
Reliability: BEST_EFFORT
Durability: VOLATILE
Lifespan: 9223372036854775807 nanoseconds
Deadline: 9223372036854775807 nanoseconds
Liveliness: AUTOMATIC
Liveliness lease duration: 9223372036854775807 nanoseconds

Node name: uav_remote_service
Node namespace: /
Topic type: sensor_msgs/msg/NavSatFix
Endpoint type: SUBSCRIPTION
GID: a5.ad.10.01.36.be.63.db.48.df.c5.8d.00.00.20.04.00.00.00.00.00.00.00.00
QoS profile:
Reliability: BEST_EFFORT
Durability: VOLATILE
Lifespan: 9223372036854775807 nanoseconds
Deadline: 9223372036854775807 nanoseconds
Liveliness: AUTOMATIC
Liveliness lease duration: 9223372036854775807 nanoseconds
@johncarl81 johncarl81 added the bug label Aug 1, 2022
@johncarl81
Copy link
Author

I believe the source of this is this PR: #690
Specifically this line:


Where we assume the default reliability policy is RELIABLE

@github-actions
Copy link

github-actions bot commented Sep 2, 2023

This issue has been marked as stale because there has been no activity in the past 12 months. Please add a comment to keep it open.

@github-actions github-actions bot added the stale label Sep 2, 2023
@johncarl81
Copy link
Author

Bump

@github-actions github-actions bot removed the stale label Sep 3, 2023
@johncarl81
Copy link
Author

Bump?

@wvergouwenavular
Copy link

@johncarl81 I am facing the same issue, any clues as to how to solve this?

@johncarl81
Copy link
Author

Hi @wvergouwenavular, have you tried out the linked PR which changes the reliability policy to BEST_EFFORT? I have not, but I'm curious if this solves the problem.

@wvergouwenavular
Copy link

Hi @johncarl81 I have not yet tried it, since it requires building rosbridge from source...

Copy link

This issue has been marked as stale because there has been no activity in the past 12 months. Please add a comment to keep it open.

@github-actions github-actions bot added the stale label Nov 22, 2024
@ashkalor
Copy link

Facing similar issues! ,Will there be any effort in this direction?

@github-actions github-actions bot removed the stale label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants