-
Hi, I have a setup with 2 create3 robots (create3 base + rasperry pi, using discovery server and communication through usb0 cable), and I want them to be able to see them both with ros2 topic list. They are both working fine on their own, but when I try to see both robots from a third PC, I can only see one at a time, and including both ips in the super client configuration file does not seem to work. Here is my setup: robot 1:
robot 2:
PC:
THE ABOVE XML CONFIG DOES NOT WORK. It only works if I comment out one Due to the nature of the robots, I have to run a discovery server in each robot, so something like running the server in the PC and pointing the ROS_DISCOVERY_SERVER to the PCs IP is not an option. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Hi @royito55
It seems that you are configuring all entites as super client instead of discovery servers, so make sure that tag In those you perform the change, make sure to also introduce the GUID prefix of the server and the metatraffic unicast locator to set at which address and port is the server listening for clients. I recommend you to read and follow this instructions. |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you for your answer. Let me try to explain better:
Should I be running a discovery server in the PC? I'm not doing so currently. I will try changing that tag from SUPER_CLIENT to SERVER. But, won't I lose the super client capabilities in the PC this way? Hope I'm explaining myself. |
Beta Was this translation helpful? Give feedback.
-
Hi @royito55 , The problem is that you are running both servers with the same ID. Try running: Robot 1On one terminal, run the server with: fastdds discovery -i 0 On the other terminals where you are running nodes, remember to export: export ROS_DISCOVERY_SERVER="127.0.0.1:11811" This configures your nodes as Clients to the Discovery Server with ID 0 Robot 2On one terminal, run the server with: fastdds discovery -i 1 On the other terminals where you are running nodes, remember to export: ROS_DISCOVERY_SERVER=";127.0.0.1:11811" This configures your nodes as Clients to the Discovery Server with ID 1 (mind the PCTo see all the topics on the PC, you'll need a Super Client that connects to both Servers (ID 0 and ID 1). This is done by applying the following XML: <?xml version="1.0" encoding="UTF-8" ?>
<dds>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<participant profile_name="super_client_profile" is_default_profile="true">
<rtps>
<builtin>
<discovery_config>
<discoveryProtocol>SUPER_CLIENT</discoveryProtocol>
<discoveryServersList>
<RemoteServer prefix="44.53.00.5f.45.50.52.4f.53.49.4d.41">
<metatrafficUnicastLocatorList>
<locator>
<udpv4>
<address>192.168.1.72</address>
<port>11811</port>
</udpv4>
</locator>
</metatrafficUnicastLocatorList>
</RemoteServer>
<!--
Mind that the prefix in this case is not the same as for the other server
You can get the prefix from the terminal in which you run the server
-->
<RemoteServer prefix="44.53.01.5f.45.50.52.4f.53.49.4d.41">
<metatrafficUnicastLocatorList>
<locator>
<udpv4>
<address>192.168.1.190</address>
<port>11811</port>
</udpv4>
</locator>
</metatrafficUnicastLocatorList>
</RemoteServer>
</discoveryServersList>
</discovery_config>
</builtin>
</rtps>
</participant>
</profiles>
</dds> Then, on the terminal where you want to run the ros2 CLI, do: export FASTRTPS_DEFAULT_PROFILES_FILE=<path_to_the_xml>
ros2 daemon stop
ros2 daemon start
ros2 topic list |
Beta Was this translation helpful? Give feedback.
Hi again,
I have prepared a small docker compose example to illustrate how to configure this (remote_pc_ds.zip). Important points:
You'll see that the pc container output shows both the
/chatter
and/temperature
topics without problems. I thinks there may be some…