Unity-Technologies / ROS-TCP-Connector

Apache License 2.0
286 stars 90 forks source link

QoS of Best Effort is not supported? #313

Open chwu-rwth opened 1 year ago

chwu-rwth commented 1 year ago

Describe the bug I have an Ouster scanner, which is running on an ouster-ros2 driver. The points are visualised in RVIZ2 as expected. Then the as the connection with the Unity TCP Connector is running, I got a message from which the ouster-ros driver is running.

In the rqt_graph, the subscriber as been connected to the topic successfully. rosgraph

Is there a method to change the QoS of which the TCP Connector is using?

To Reproduce

  1. clone : https://github.com/ouster-lidar/ouster-ros/tree/ros2
  2. Add Unity TCP Endpoint into the ouster workspace
  3. Run colcon build
  4. Run ouster-ros in Rviz2
  5. Open unity and run the connection.

Console logs / stack traces

[os_driver-1] [WARN] [169236xxxx.52xxxx992] [ouster.os_driver]: New subscription discovered on topic '/ouster/points', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY

Expected behavior The points are rendered into the game scene as shown in tutorial and example warehouse scene.

Screenshots image Connection to the topic has been established as shown in the blue arrow.

Environment (please complete the following information, where applicable):

leonmceniery commented 10 months ago

I don't believe this is an issue with the ROS-TCP-Connector package, but is related to the ROS-TCP-Endpoint ROS2 Package: https://github.com/Unity-Technologies/ROS-TCP-Endpoint

The ROS-TCP-Endpoint exists as a ROS2 node (in your system setup) and uses a Socket to send serialized ROS data to the ROS-TCP-Connector in Unity. The ROS-TCP-Endpoint generates the ROS-side subscribers which receive the data, so this is where you can change subscription QOS reliability settings.

This can be done by adding the below at line 47 of the ROS-TCP-Endpoint ros2 package subscriber.py file

qos_profile.reliability = QoSReliabilityPolicy.RELIABLE (or other QoS settings you might need to adjust)

TO NOTE: This will change the QoS Reliability for all subscribers using the ROS-TCP-Endpoint.