microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.32k stars 4.55k forks source link

I can't connect python client on WSL2 with Airsim running on Windows 11 #4733

Open mattbrth opened 1 year ago

mattbrth commented 1 year ago

Question

What's your question?

How can I connect Airsim running on Windows 11 with a python script running on WSL2 ?

Include context on what you are trying to achieve

I would like to connect Airsim running on Windows 11 with a python script running on WSL2 but when trying to reach the WSL2 Host, it says connection error.

Context details

I tried to disable the firewall but it doesn't connect. When I run the python script on Windows with the IP 127.0.0.1 it works so the problem comes from WSL2. Do you know any configuration I might have forgotten ? I used WSL_HOST_IP=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}') as the HOST for the WSL2 python script.

Include details of what you already did to find answers