-
So I tried making my own custom node in python, subscribed to /dock and /ir_intensity nodes and publishing on /cmd_vel. The node worked perfectly in simulation but when trying to make it run on the real robot it can publish on /cmd_vel with no problem, making the robot move as intended, but can't read from the two topics due to a QoS error. I tried running Coverage, from the examples, and it runs with no problem so I think it can't be a connection error. What am I doing wrong? What should I try to fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @gmptrr98, this error indicates that there is a QoS mismatch between the subscriptions in your application and the publishers on the robot (and also there's probably a bug in the simulator since it should use the same QoS as the real robot). The publishers on the robot use Best Effort reliability. To check the QoS for a robot entity, you can use for example: I recommend to use the
For more details on ROS 2 QoS, have a look at https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html. |
Beta Was this translation helpful? Give feedback.
-
The I would be surprised if your issue is related to a QoS problem or to data-loss during the communication. Piacere di conoscerti! Spero ti stia divertendo con il Create 3! |
Beta Was this translation helpful? Give feedback.
-
I was working exactly at 500ms, now I'm using 50ms and it's working perfectly. |
Beta Was this translation helpful? Give feedback.
Hi @gmptrr98, this error indicates that there is a QoS mismatch between the subscriptions in your application and the publishers on the robot (and also there's probably a bug in the simulator since it should use the same QoS as the real robot).
The publishers on the robot use Best Effort reliability.
So, if your subscriptions use "Reliable" reliability, they will not be able to communicate.
To check the QoS for a robot entity, you can use for example:
ros2 topic info --verbose /dock
I recommend to use the
qos_profile_sensor_data
QoS profile in your subscriptions.For example in Python you can do: