Reputation: 1
After connecting Raspberry Pi and PC via SSH, I installed ROS2 Foxy. However, when trying to use talker and listener nodes, communication between PC to PC or Raspberry Pi to Raspberry Pi works, but communication between PC and Raspberry Pi does not, despite setting the domain ID to be the same. The talker and listener nodes do not seem to function in this setup.
The left terminal window is for the PC, and the right terminal window is for the Raspberry Pi
I also tried adding the domain ID to the bashrc.
I expected the situation in the picture above.
I used ROS2 foxy, and both are ubuntu 20.04. Raspberry pi used a server.
Upvotes: 0
Views: 1025
Reputation: 1
First off all you need to check on your Raspberry Pi if you can ping your PC by entering the command ping <your PC ip address>
on your Raspberry Pi's command line. If you do not seem to be getting a response, then it means your PC's (OS on the VM) IP address isn't visible. So you have to go to your VM's network config and change the adapter1 from NAT to "bridged to". I'll link the videos down below so you can refer to them for more clarity.
https://youtu.be/L8NbXczVJwo?si=TCFDszbMgSIEOQsL
https://roboticsbackend.com/ros2-multiple-machines-including-raspberry-pi/
Upvotes: 0