(ROS in WSL2) + (ROS on Windows) communication
Hi, everyone.
What I really want is to develop in WSL2 ROS, and run Rviz natively on Windows. However, there is one problem I can't solve:
- Rviz (on native Windows) can communicate with roscore (on WSL2)
- Rviz (on native Windows) CAN'T communicate with nodes/advertisers/publishers (on WSL2)
I've already configured ROS on Windows with ROS_MASTER_URI
and ROS_IP
.
One possible reason: Ubuntu on WSL2 share the same hostname as the host Windows, but different ip address (as WSL2 is running as a hyper-v virtual machine). Even though I can change /etc/hostname
and /etc/hosts
to rename Ubuntu, when roscore
runs, it still shows the same name as the Windows host.
Hi,
did you find a solution for this communication issue? i have the same problem.