Replies: 4 comments 2 replies
-
Thanks for your contribution, @razr
This ROS 2 environment variable is equivalent to the initial peers Fast DDS feature (see the RMW implementation code for reference). Also, I am moving this ticket to the Q&A discussion forum as per Fast DDS CONTRIBUTING guidelines |
Beta Was this translation helpful? Give feedback.
-
Thanks much @JLBuenoLopez-eProsima for your quick reply. Let me try it out |
Beta Was this translation helpful? Give feedback.
-
@JLBuenoLopez-eProsima <!--
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
-->
<participant profile_name="initial_peers_example_profile" is_default_profile="true">
<rtps>
<builtin>
<initialPeersList>
<locator>
<udpv4>
<address>172.17.0.1</address>
<port>7412</port>
</udpv4>
</locator>
</initialPeersList>
</builtin>
</rtps>
</participant> If I try to run my example with it, I get the following error wruser@ros2native:/work/ros2_native/install$ env | grep FAST
FASTRTPS_DEFAULT_PROFILES_FILE=/work/fastdds-docker.xml
wruser@ros2native:/work/ros2_native/install$ ros2 run demo_nodes_cpp listener
2023-08-22 11:05:26.319 [XMLPARSER Error] Not found root tag -> Function parseXML
2023-08-22 11:05:26.319 [XMLPARSER Error] Error parsing '/work/fastdds-docker.xml' -> Function loadXMLFile
wruser@ros2native:/work/ros2_native/install$ env | grep ROS
ROS_VERSION=2
ROS_PYTHON_VERSION=3
ROS2_WS=/opt/ros2_ws
ROS_LOCALHOST_ONLY=0
ROS_DISTRO=humble |
Beta Was this translation helpful? Give feedback.
-
@JLBuenoLopez-eProsima thank you for reply I have fixed my XML file but still, there is no connection between the docker and host Dockerwruser@ros2native:/work/ros2_native/install$ hostname -I
172.17.0.4
wruser@ros2native:/work/ros2_native/install$ cat /work/fastdds-docker.xml
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<participant profile_name="initial_peers_example_profile" is_default_profile="true">
<rtps>
<builtin>
<initialPeersList>
<locator>
<udpv4>
<address>172.17.0.1</address>
<port>7412</port>
</udpv4>
</locator>
</initialPeersList>
</builtin>
</rtps>
</participant>
</profiles>
wruser@ros2native:/work/ros2_native/install$ export FASTRTPS_DEFAULT_PROFILES_FILE=/work/fastdds-docker.xml
wruser@ros2native:/work/ros2_native/install$ ros2 run demo_nodes_cpp listener Host$ ifconfig docker0
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
$ ping 172.17.0.4
PING 172.17.0.4 (172.17.0.4) 56(84) bytes of data.
64 bytes from 172.17.0.4: icmp_seq=1 ttl=64 time=0.038 ms
64 bytes from 172.17.0.4: icmp_seq=2 ttl=64 time=0.034 ms
$ export FASTRTPS_DEFAULT_PROFILES_FILE=$HOME/github/razr/vxworks7-ros2-build/fastdds.xml
$ cat $HOME/github/razr/vxworks7-ros2-build/fastdds.xml
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<participant profile_name="initial_peers_example_profile" is_default_profile="true">
<rtps>
<builtin>
<initialPeersList>
<locator>
<udpv4>
<address>172.17.0.4</address>
<port>7412</port>
</udpv4>
</locator>
</initialPeersList>
</builtin>
</rtps>
</participant>
</profiles>
$ ros2 run demo_nodes_cpp talker
[INFO] [1692708772.697120937] [talker]: Publishing: 'Hello World: 1'
[INFO] [1692708773.697069323] [talker]: Publishing: 'Hello World: 2'
[INFO] [1692708774.697118381] [talker]: Publishing: 'Hello World: 3' |
Beta Was this translation helpful? Give feedback.
-
Is there an already existing issue for this?
Expected behavior
Hello @MiguelCompany
I want to communicate between the docker container and my host, both running ROS2
humble
and Ubuntu 22.04.It works fine on
rolling
withROS_STATIC_PEERS
, but does not work onhumble
.What would be the proper FastDDS XML configuration for it on
humble
? I have looked here but couldn't find it.Current behavior
communication between docker and host both running ROS 2
humble
talker/listener
does not workSteps to reproduce
build ROS 2
humble
on Ubuntu 22.04 and run thetalker
example inside docker and thelistener
example on the host.Fast DDS version/commit
humble
Platform/Architecture
Other. Please specify in Additional context section.
Transport layer
Default configuration, UDPv4 & SHM
Additional context
Ubuntu 22.04
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response
Beta Was this translation helpful? Give feedback.
All reactions