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 · 1 comment
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
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

2 participants