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


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