Closed mkrunic-windriver closed 1 year ago
Thanks for reporting it. Please do
Host side:
# add a multicast route to the tap0
$ sudo ip route add 225.0.0.0/8 dev tap0
$ sudo ip route show
...
192.168.200.0/24 dev tap0 proto kernel scope link src 192.168.200.254
225.0.0.0/8 dev tap0 scope link
$ ros2 multicast receive
Waiting for UDP multicast datagram...
VxWorks side:
[vxWorks *]# python3 ros2 multicast send
Launching process 'python3' ...
Process 'python3' (process Id = 0xffff800000361780) launched.
Sending one UDP multicast datagram...
On the host side you should get
Received from 192.168.200.1:50614: 'Hello World!'
I can confirm that sending and receiving UDP packages using ros2 multicast is now successful.
Now the original problem still persists. I have created simple ros2 publisher subscriber packages. When I run publisher and subscriber on the same host (VxWorks or Ubuntu), subscriber successfully receives messages send by publisher, but when subscriber is run on a different host (VxWorks or Ubuntu), messages is not received.
As I have described above I have added this line to vxscript: taskSpawn 0,50,0,0x20000,setenv,"RMW_IMPLEMENTATION","rmw_cyclonedds_cpp"
and this to Ubuntu: export RMW_IMPLEMENTATION="rmw_cyclonedds_cpp"
just to be sure they are using the same dds middleware.
Is there anything else I have missed to configure to make these two nodes on different hosts to talk to each other?
I'm still digging into the network setting problem.
Starting from ROS 2 iron
release the ROS_STATIC_PEER
environment variable has been introduced. it works for the docker/host combination, see https://github.com/eProsima/Fast-DDS/discussions/3811. ROS_STATIC_PEER
does not exist in humble
, you need to use an XML profile instead. eProsima has recommended using this profile to communicate between two peers.
So here are the steps On the docker side put the xml profile name it as fastdds-docker.xml in vxworks7-ros2-build repo
you can fill the file with the config as `<?xml version="1.0" encoding="UTF-8" ?>
Hi @borntocodeRaj what is the difference between your setup and what I have described here
Hello @razr (Andrei) the difference I see is the IP address for me in the xml profile is same for the docker and the host.
I'm glad to see that it works on your side. Could you please put the content of both XML files you are using?
I'm also wondering about this. You run listener
, but the output messages are from the talker
.
wruser@ros2native:/work/ros2_native/install$ ros2 run demo_nodes_py listener
[INFO] [1692708772.697120937] [talker]: Publishing: 'Hello World: 1'
[INFO] [1692708773.697069323] [talker]: Publishing: 'Hello World: 2'
[INFO] [1692708774.697118381] [talker]: Publishing: 'Hello World: 3'
Hello @razr actually that is a typo, I am actually getting listener when I run listener, and talker on the side of the terminal, where I type talker, attached are the actual screenshot of that. Communication of talker and Listener
XML file content
It looks like you have an error opening an XML file. Most probably you still run it with a non-peer-to-peer configuration. XML file shall be loaded on both sides
The default gateway (g=192.168.200.254
) was not set in the VxWorks boot line, Thanks @robwoolley for pointing it out.
[vxWorks *]# route show
INET route table - vr: 0, table: 254
Destination Gateway Flags Use If Metric
0.0.0.0/0 host UGS 0 gei0 0
I can confirm that the communication between VxWorks and Host (Ubuntu 22.04.) is working now on my side as well when adding default route. One more thing I had to do:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
In my case rmw_cyclonedds_cpp
was set as ros2 middleware, but default is rmw_fastrtps_cpp
.
Thanks for support @razr and @rcwoolley!
Cheers, Momo
I have setup my environment according to instructions, but when I try ros2 multicast from both directions nothing is being received on the other side:
https://github.com/ros2/ros2cli/tree/master/ros2multicast
In the Wireshark the message is not detected. When I execute the following line on the VxWorks: [vxWorks *]# ifconfig gei0 inet add 224.0.0.1/8
message is then captured by Wireshark, but not with ros2 multicast receive.
Just to emphasize that I can ping other side from both directions.
Also I have added this line to vxscript: taskSpawn 0,50,0,0x20000,setenv,"RMW_IMPLEMENTATION","rmw_cyclonedds_cpp"
and: export RMW_IMPLEMENTATION="rmw_cyclonedds_cpp"
on Ubuntu, to be sure that I am using the same version of DDS.
I am using ROS2 Humble.