Closed b1n-ch1kn closed 2 years ago
Hi @b1n-ch1kn,
How do you currently connect to the sim in WSL2? I know you can open some ports in your windows firewall and can use the host
parameter to specify where the simulator is running, but I don't like this approach.
Hi @wouter-heerwegh Yeah the only way we've been able to get the bridge in WSL2 to connect to the sim is to specify 'host:= ' It's not the worst thing, but can be annoying on a laptop when IPs change depending on what building you're in. Haven't tried the firewall port method, but could be looked into at some point.
Hi @b1n-ch1kn,
I used this code to always set the IP of my host machine. I am however not able to connect to the simulator without disabling my firewall. Are you running windows 11? Or did you do something specifically to open ports?
if [ ! -n "$(grep -P "[[:space:]]winhost" /etc/hosts)" ]; then
printf "%s\t%s\n" "$winhost" "winhost" | sudo tee -a "/etc/hosts"
fi
Ok cool. I use Windows 10 and 11 actually (laptop/desktop) and the rest of my team is also fairly split. I don't think we've ever had port or firewall issues and I havent had to disable Windows firewall. I know when you first open the sim .exe, it prompts if you'd like to use this in private vs public wifi areas, but other than that, it's mostly just worked fine specifying host_ip
.
Actually, when running a VPN it breaks, so the bridge won't detect the sim running.
This has been tested on Humble and Galactic in Ubuntu 20.04, WSL2. These were problematic lines stopping the bridge from
colcon
building in Humble, but maintains backwards compatibility.As mentioned in https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/issues/296 there may be further compatibility issues with Ubuntu 22.04 that can be addressed in a future PR.