ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Ros2 connection between multiple machines

asked 2022-02-11 09:10:09 -0500

wsurenbroek gravatar image

I'm new to Ros and I have a question about it. I have a Raspberry Pi 4 with Ros server installed and on my Mac I run Ubuntu (With Virtualbox) The problem is that I can't communicate with my Raspberry pi.

I tried to run the talker / listener demo but with no succes. Then I tried to run the Ros2 multicast send / receiver but they can't see each other.

Can anybody help me please?

edit retag flag offensive close merge delete

Comments

We're gonna need more information. What have you tried already? Can you ping the raspberry pi from your vm? Can you ping your vm from the raspberry pi? If you can't successfully ping from both systems, you'll need to fix that first. Which rmw_implementation are you using? Which ros2 version are you using?

ChuiV gravatar image ChuiV  ( 2022-02-11 13:58:56 -0500 )edit

Thanks for your response. Yes I can ping my Raspberry pi and backwards. I tried to run the command “Ros2 multicast receive” on my Raspberry pi and on my main computer I run “Ros2 multicast send” but i receive nothing.

I also tried to changed the Virtualbox network settings, But also with no succes. I’m new to the rmw_implementation. Where can I see that? I have installed Galactic on both machines.

wsurenbroek gravatar image wsurenbroek  ( 2022-02-13 07:49:46 -0500 )edit

Chances are you're using cyclone dds then. There may be other problems, but lets try setting your rmw implementation to fastdds by running

export RMW_IMPLEMENTATION=rmw_fastrtps_cpp

on both your virtualbox machine and your raspberry pi. Last I knew, Cyclone DDS doesn't yet support binding to multiple network interfaces, So it just randomly selects one. By using fastdds, we'll know that it's using all available network interfaces.

Which network interface mode are you using in virtualbox? I've had the best success with "Bridged Adapter." Unfortunately my virtualbox is broken right now, So I'm unable to testing anything until later.

ChuiV gravatar image ChuiV  ( 2022-02-16 09:17:32 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2022-10-30 22:11:34 -0500

chivas1000 gravatar image

updated 2022-10-30 22:15:01 -0500

So I've ran into similar problems

that My setup is a robot and a server(cable with a extended AP opened up for a ASUS AC86U) robot and server are all ubuntu 20.04 foxy and robot connected with router with 5G WIFI while server uses cables.

When my robot tried to pubilish demo_talker and server open demo_listener nodes, they cannot see each other, so do the ros multicast send/receive

I’ve tried many methods including switching DDS vendor, open ICMP proxy(multicast settings in router) etc. it didn’t work

and the discussion on the web still goes, for maybe the ROS2 and DDS is not that compatible

finally, I uses default FAST DDS and refer to:

https://fast-dds.docs.eprosima.com/en/v2.3.1/fastdds/ros2/discovery_server/ros2_discovery_server.html

to setup the node discovery server, that might means you specify which servers to connect for the devices, which is something like ROS1

to my application, actually I do not care about if the middleware is reliased by DDS or not — as soon as it could transfer the needed data(better than nothing)

So for the people struggled with the similar multicast related issues, I advise switching to node discovery server would be a quick fix — there are too few informations and too many options for both DDS and Router to Debug, and fixing this maybe out of your work…

Anyway, there are many issue like this and left to solve, so I am advising this as it is one of a possible ways to help.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-02-11 09:10:09 -0500

Seen: 836 times

Last updated: Oct 30 '22