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

[WARN] New subscription discovered on topic '/scan', requesting incompatible QoS #1122

Open
hsd-dev opened this issue Jan 12, 2024 · 2 comments
Labels
more-information-needed Further information is required

Comments

@hsd-dev
Copy link

hsd-dev commented Jan 12, 2024

Setup: Ubuntu 22.04, ROS humble

I am writing a ROS driver for a laser scanner and want to view the scan data in RViz. I have used SensorDataQoS while creating the publisher

scan_publisher_ = node_->create_publisher<sensor_msgs::msg::LaserScan>(scan_topic, rclcpp::SensorDataQoS());

and have also set the QoS values in .rviz as well

      Topic:
        Depth: 5
        Durability Policy: Volatile
        Filter size: 10
        History Policy: Keep Last
        Reliability Policy: Best Effort
        Value: /scan

when I run the driver, I get the following warning

[ros_main-1] [WARN] [1700130825.414718492] [ros_main]: New subscription discovered on topic '/scan', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY

But I can still view the data in RViz. Also, following is verbose output for the scan topic info:

ros2 topic info /scan --verbose
Type: sensor_msgs/msg/LaserScan

Publisher count: 1

Node name: ros_main
Node namespace: /
Topic type: sensor_msgs/msg/LaserScan
Endpoint type: PUBLISHER
GID: 01.0f.25.3c.d6.25.3e.66.01.00.00.00.00.00.12.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: BEST_EFFORT
  History (Depth): UNKNOWN
  Durability: VOLATILE
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

Subscription count: 1

Node name: rviz
Node namespace: /
Topic type: sensor_msgs/msg/LaserScan
Endpoint type: SUBSCRIPTION
GID: 01.0f.25.3c.da.25.19.b4.01.00.00.00.00.00.22.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: BEST_EFFORT
  History (Depth): UNKNOWN
  Durability: VOLATILE
  Lifespan: Infinite
  Deadline: Infinite
  Liveliness: AUTOMATIC
  Liveliness lease duration: Infinite

So the settings do actually match. Why am I getting the warning in that case? And this happens only on humble (galactic and foxy works). I can do a test with the latest rolling as well, just in case, to narrow down that the problem is in the humble version.

@audrow
Copy link
Member

audrow commented Jan 25, 2024

Hi @ipa-hsd, could you provide the full code for a minimal reproducible example? Also, which DDS are you using?

Thanks for making the issue.

@audrow audrow added the more-information-needed Further information is required label Jan 25, 2024
@wltjr
Copy link

wltjr commented Nov 21, 2024

I am experiencing this as well using pointcloud_to_laserscan, anytime I start Rviz2, it seems to be messing up the topic and pointcloud_to_laserscan stops publishing to the /scan topic. I am using what should be the latest available, ROS 2 Jazzy, Ubuntu Noble, packaged versions.

[pointcloud_to_laserscan_node-6] [WARN] [1732215357.520418540] [pointcloud_to_laserscan]: New subscription discovered on topic '/scan', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[pointcloud_to_laserscan_node-6] [INFO] [1732215357.523424432] [pointcloud_to_laserscan]: Got a subscriber to laserscan, starting pointcloud subscriber
[pointcloud_to_laserscan_node-6] [INFO] [1732215482.382114669] [pointcloud_to_laserscan]: No subscribers to laserscan, shutting down pointcloud subscriber

I definitely changed it in Rviz2 to be best effort, to match the rest, I have no idea where the reliability policy is coming from. Like the original report, when I look at the topic information under ros2, rviz2 is using best effort. It seems to be happening on initial connect or something else in Rviz2. I can see about providing additional information but not sure I can provide a reproducible example. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Further information is required
Projects
None yet
Development

No branches or pull requests

3 participants