Replies: 1 comment
-
Hi @Krzo99, Thanks for using Fast DDS and ROS 2. Leaving some suggestions that may help in the scenario you propose
Anyways, if you need further help to setup your architecture, please contact our commercial support at [email protected]. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I'm making a mobile robot using ROS2 and FastDDS. The said robot can be monitored in Rviz2.
Robot is mostly running in good internet connection, however, it can happen that the signal gets very weak. In this case, the robot should continue working as previously commanded. As I'm not yet 100% versed on FastDDS, I'll explain my thinking and I hope somebody can help me.
The problem
With default FastDDS configuration in low-bandwidth moments, publishers (data_writters) block the main thread for a long time.
This happens as they are set to SYNC publish mode by default. So low bandwidth means low upload speed, and it can take multiple seconds to upload anything (Talking about < -80dB signal) (even with BEST_EFFORT ROS2 QoS).
I tried solving this with a ASYNC publish mode, however, the data rate is still so low, that, as it says in the DOCS, it blocks when the send queue is full. What solved this was setting
<non_blocking_send>true</non_blocking_send>
in a custom<transport_descriptor>
. However, subscribing to topics (from PC & Robot) from the same node tops-up the queue again, and no other topics are added or transmitted. Does each ros2 node have one queue, or does each publisher have its own queue?This is a big problem, as some topics might be subscribed by both, Rviz2 and the Robot at the same time. I guess I could create seperate publishers for some topics. One for on-robot and one for sending over network.
The Solution?
Ideally, I want to achieve the following:
The first solution would be easy.
The second, however, I'm not sure how to tackle.
I guess, making separate publishers that are only subscribed on a remote PC for topics that are needed by both, PC and robot.
Could I create multiple
<transport_descriptor>
tags, all with<type>UDPv4</type>
, and each with separate<interfaces>
?Would that work, however I'm not sure what interface to put for any transport that happens only on the robot.
Something like this:
I would then assign ASYNC to individual topics that go over wlan0.
But I'm not sure how do I make sure wlan0_transport is used with publishers (and not internal_transport)?
If nothing else, I could create a custom publishing class, that would handle wlan0 publishing. But I hope that isn't needed.
Is my train of thought correct?
Thanks for all your help!
Beta Was this translation helpful? Give feedback.
All reactions