AirSim
AirSim copied to clipboard
Ardupilot with airsim: Error while receiving rotor control data
Bug report
- AirSim Version/#commit:Binary 1.7.0
- UE/Unity version:N/A
- autopilot version:master
- OS Version:Ubuntu 18.04
What's the issue you encountered?
When I run the binary with ArduCopter's setting, an error was occurred as follows:
[2022.04.21-06.56.16:031][ 0]LogStaticMesh: Allocated 512x387x128 distance field atlas = 48.4Mb, with 220 objects containing 33.5Mb backing data
Error while receiving rotor control data - ErrorNo: -1
[2022.04.21-06.56.16:108][ 0]LogTemp: Error while receiving rotor control data - ErrorNo: -1
Error while receiving rotor control data - ErrorNo: -1
[2022.04.21-06.56.16:208][ 0]LogTemp: Error while receiving rotor control data - ErrorNo: -1
[2022.04.21-06.56.16:217][ 0]LogContentStreaming: Texture pool size now 1000 MB
Error while receiving rotor control data - ErrorNo: -1
[2022.04.21-06.56.16:309][ 0]LogTemp: Error while receiving rotor control data - ErrorNo: -1
[2022.04.21-06.56.16:407][ 0]LogVulkanRHI: Creating new VK swapchain with present mode 0, format 44, color space 0, num images 3
Error while receiving rotor control data - ErrorNo: -1
[2022.04.21-06.56.16:410][ 0]LogTemp: Error while receiving rotor control data - ErrorNo: -1
Error while receiving rotor control data - ErrorNo: -1
Error while receiving rotor control data - ErrorNo: -1
Error while receiving rotor control data - ErrorNo: -1
Error while receiving rotor control data - ErrorNo: -1
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):
{
"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": 9003,
"ControlPort": 9002
}
}
}
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.