GSoC 2019: AirSim Simulator Support for ArduPilot SITL Part II

What worked for me is to tell Airsim and SITL explicitly which IP addresses to use. I didn’t use rajat2004 fix.
So your C:\Users\YourUsername\Documents\AirSim\settings.json looks like this:
{
“SeeDocsAt”: “AirSim/docs/settings.md at main · microsoft/AirSim · GitHub”,
“SettingsVersion”: 1.2,
“LogMessagesVisible”: true,
“SimMode”: “Multirotor”,
“OriginGeopoint”: {
“Latitude”: 37.334947,
“Longitude”: -122.012715,
“Altitude”: 583
},
“Vehicles”: {
“Copter”: {
“VehicleType”: “ArduCopter”,
“UseSerial”: false,
“LocalHostIp”: “192.168.0.85”, ← this is IP of your main Windows
“UdpIp”: “172.26.240.75”, ← this is IP of your Linux(Ubuntu) under WSL2.
“UdpPort”: 9003,
“ControlPort”: 9002
}
}
}

And you run your SITL under WSL2 by this command:
sim_vehicle.py -v ArduCopter -f airsim-copter --console --map --sim-address=192.168.0.85

It worked on Colosseum fork of Airsim on UnrealEngine 5.4 (after fixing build errors). But I guess it should work on older UE versions (5.2 is last officially supported) as well.

3 Likes