microsoft / AirSim

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

SITL + AirSim can not arm: Main loop slow (222Hz < 300Hz) #4817

Open Sautenich opened 1 year ago

Sautenich commented 1 year ago

Bug report

Issue:

Trying to arm the vehicle as usual and getting this error: image The Airsim is working.

Settings

{ "SettingsVersion": 1.2, "LogMessagesVisible": true, "SimMode": "Multirotor", "OriginGeopoint": { "Latitude": -35.363261, "Longitude": 149.165230, "Altitude": 583 }, "Vehicles": { "Copter": { "VehicleType": "ArduCopter", "RC": { "RemoteControlID": 2 }, "UseSerial": false, "LocalHostIp": "127.0.0.1", "UdpIp": "127.0.0.1", "UdpPort": 9003, "ControlPort": 9002 } } }

How can the issue be reproduced?

Start SITL with WSL 1 1.Trying to start SITL+Airsim and Getting this error: Main loop slow(222Hz < 300Hz)

Full error message

AP: Arm: GPS 1: not healthy AP: Arm: Main loop slow (222Hz < 300Hz) AP: PreArm: GPS 1: not healthy AP: PreArm: Main loop slow (222Hz < 300Hz) AP: PreArm: GPS 1: not healthy AP: PreArm: Main loop slow (222Hz < 300Hz) Flight battery 100 percent AP: PreArm: GPS 1: not healthy AP: PreArm: Main loop slow (222Hz < 300Hz)

Sautenich commented 1 year ago

I've found some similar solution in this topic. Trying to figure out the command i need to use. The problem is with Ardupilot.

https://github.com/ArduPilot/ardupilot/pull/22320

Sautenich commented 1 year ago

Actually, force arming is solving this problem. Maybe, i need to use WSL2 with biggest amount of CPU/GPU/Memory to support the calculations. param set ARMING_CHECK 0 worked for me, but didn't resolve the problem in general

guyzoler commented 3 months ago

loos like it is somewhat a configuration issue, i get the same error while i have a lot of spare CPU \ MEM \ GPU

image

Looking at the wsl stats doesn't look like there is a real performance issue there: image

my guess is that there is some bug in the code causing it to wait for data from airsim or something so it delays the main loop.

guarav00tanwar commented 2 weeks ago

Bug report

* AirSim Version/#commit:

* UE/Unity version: 4.27

* autopilot version: N/A

* OS Version: Windows 10

Issue:

Trying to arm the vehicle as usual and getting this error: image The Airsim is working.

Settings

{ "SettingsVersion": 1.2, "LogMessagesVisible": true, "SimMode": "Multirotor", "OriginGeopoint": { "Latitude": -35.363261, "Longitude": 149.165230, "Altitude": 583 }, "Vehicles": { "Copter": { "VehicleType": "ArduCopter", "RC": { "RemoteControlID": 2 }, "UseSerial": false, "LocalHostIp": "127.0.0.1", "UdpIp": "127.0.0.1", "UdpPort": 9003, "ControlPort": 9002 } } }

How can the issue be reproduced?

Start SITL with WSL 1 1.Trying to start SITL+Airsim and Getting this error: Main loop slow(222Hz < 300Hz)

Full error message

AP: Arm: GPS 1: not healthy AP: Arm: Main loop slow (222Hz < 300Hz) AP: PreArm: GPS 1: not healthy AP: PreArm: Main loop slow (222Hz < 300Hz) AP: PreArm: GPS 1: not healthy AP: PreArm: Main loop slow (222Hz < 300Hz) Flight battery 100 percent AP: PreArm: GPS 1: not healthy AP: PreArm: Main loop slow (222Hz < 300Hz) I have setup multi-drone-simulation in Gazebo with SITL. I have PC with intel xeon , 32Gb ram. So hardware was not an issue. So, what i did is, I changed some parameters in SITL as follow; LOG_BITMASK - 156126.0 (old value- 176126.0) LOG_FILE_BUFSIZE - 100 (old value- 200) SCHED_LOOP_RATE - 200 (old value- 400) this worked for me

guarav00tanwar commented 2 weeks ago

I have setup multi-drone-simulation in Gazebo with SITL. I have PC with intel xeon , 32Gb ram. So hardware was not an issue. So, what i did is, I changed some parameters in SITL as follow; LOG_BITMASK - 156126.0 (old value- 176126.0) LOG_FILE_BUFSIZE - 100 (old value- 200) SCHED_LOOP_RATE - 200 (old value- 400) this worked for me