以下の内容はhttps://shuzo-kino.hateblo.jp/entry/2023/11/13/205410より取得しました。


ROS2でtopicを読もうとしたら" requesting incompatible QoS. No messages will be sent to it."とか言われたとき

ROS2では通信品質QoSの設定があり、設定が適切でないと通信できません

実際のところ

rclpyでlidarからスキャンデータを取得し処理して別建てtopicに流すという処理を書いてたところエラーが

lidarの方のプロセスでは

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

pythonのほう

[WARN] [1699789231.895727851] [closest_distance_publisher]: New publisher discovered on topic 'scan', offering incompatible QoS. No messages will be received from it. Last incompatible policy: RELIABILITY

解決=>

この場合、pythonの方をReliabilityPolicyを変える

qos_profile = QoSProfile(depth=10, reliability=ReliabilityPolicy.RELIABILITY)

から、ベストエフォート(最善の努力)にして

qos_profile = QoSProfile(depth=10, reliability=ReliabilityPolicy.BEST_EFFORT)



以上の内容はhttps://shuzo-kino.hateblo.jp/entry/2023/11/13/205410より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14