Open Kevinlibaba opened 2 years ago
Are you running both on Linux? For using on Windows with Ardupilot on a separate machine or in WSL2 you'll need some settings changes.
Are you running both on Linux? For using on Windows with Ardupilot on a separate machine or in WSL2 you'll need some settings changes.
@samuelctabor Thanks, Yes, both are running on Ubuntu 18.04
I believe the AirSim binary is waiting for a response from Ardupilot. If you run Ardupilot, it should resume. Usually the execution order is Ardupilot and then AirSim.
I have recently encountered the same problem. A quick fix is changing the UdpPort and ControlPort
{
"SettingsVersion": 1.2,
"LogMessagesVisible": true,
"SimMode": "Multirotor",
"OriginGeopoint": {
"Latitude": -35.363261,
"Longitude": 149.165230,
"Altitude": 583
},
"Vehicles": {
"Copter": {
"VehicleType": "ArduCopter",
"UseSerial": false,
"LocalHostIp": "127.0.0.1",
"UdpIp": "127.0.0.1",
"UdpPort": 5760,
"ControlPort": 5760
}
}
}
However, when the AirSim is started the quadcopter just increase its vertical speed constantly, so you can not really control it.
Are you running both on Linux? For using on Windows with Ardupilot on a separate machine or in WSL2 you'll need some settings changes.
Can you expand on this? I'm using WSL2 Ubuntu-20.04 and I've followed the instructions but I'm seeing the same error message.
Test environment: Windows 11 Pro build 22000.708, running Ubuntu 22.04LTS under WSL2. Installed Unreal Engine v4.27.2 via Epic Games Launcher. Complied AirSim under Visual Studio 2022 (Community) , and ArduPilot in WSL2 with waf.
same issue 1.Set the 'VehicleType' in settings to ArduCopter, and run airsim with binary. the error will be occurred. 2.If set the 'VehicleType' back to SimpleFlight", anything went to well.
Has anyone solved the problem? Thanks
@WangLouis @Kevinlibaba try this: https://discuss.ardupilot.org/t/gsoc-2019-airsim-simulator-support-for-ardupilot-sitl-part-ii/46395/29?u=crose4
I had this problem for 2 years which kept me from using AirSim with WSL2. Getting the ip address of WSL2 and windows like the post suggests is what solved it for me. Hope it helps!
@crose72 thank you for your help~ but i can't solved it.
1.When i use ip address of WSL2 , It is error https://www.youtube.com/watch?v=YJyt5aou1rI
2.'VehicleType' back to SimpleFlight", anything went to well. https://www.youtube.com/watch?v=MqZPbHv2HoQ
3.Set the 'VehicleType' in settings to ArduCopter, the error will be occurred. https://www.youtube.com/watch?v=G8It1qr6jrk
Should AirSim be executed first or WSL2 SITL be executed first? Thank you
@crose72
That worked, I got it , thank you so much!
“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. AirSim be executed first. WSL2 Ardupilot SITL be executed second.
@crose72
That worked, I got it , thank you so much!
“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. AirSim be executed first. WSL2 Ardupilot SITL be executed second.
Sorry I didn't get back to you earlier. I'm glad you've got it now! Your settings and process look correct.
I have recently encountered the same problem. A quick fix is changing the UdpPort and ControlPort
{ "SettingsVersion": 1.2, "LogMessagesVisible": true, "SimMode": "Multirotor", "OriginGeopoint": { "Latitude": -35.363261, "Longitude": 149.165230, "Altitude": 583 }, "Vehicles": { "Copter": { "VehicleType": "ArduCopter", "UseSerial": false, "LocalHostIp": "127.0.0.1", "UdpIp": "127.0.0.1", "UdpPort": 5760, "ControlPort": 5760 } } }
However, when the AirSim is started the quadcopter just increase its vertical speed constantly, so you can not really control it.
Hi! I have the same problem... I changed the ports but after that the quadcopter started to increase its vertical speed... do you know how can I solve?
Bug report
What's the issue you encountered?
When I run the binary with ArduCopter's setting, an error was occurred as follows:
How can the issue be reproduced?
1.Set the 'VehicleType' in settings to ArduCopter/ArduRover, and run airsim with binary. the error will be occurred. 2.If set the 'VehicleType' back to SimpleFlight", anything went to well.
Include full error message in text form
see log file.
Settings
my setting.json is as follows (from here):