Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Sautenich opened this issue Mar 22, 2023 · 6 comments
Open

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

Sautenich opened this issue Mar 22, 2023 · 6 comments

Comments

@Sautenich
Copy link

Sautenich commented Mar 22, 2023

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)

@Sautenich
Copy link
Author

Sautenich commented Mar 27, 2023

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

ArduPilot/ardupilot#22320

@Sautenich
Copy link
Author

Sautenich commented Mar 27, 2023

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
Copy link

guyzoler commented Mar 18, 2024

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
Copy link

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
Copy link

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

@valeriavalery
Copy link

Hi everyone! I'm trying to use AirSim to simulate two drones with ArduPilot for autonomous control. I've followed the entire guide (link here: SITL with AirSim) but I'm facing some issues:

When I run mavproxy.py --master=tcp:127.0.0.1:5762 --console --map, it gives me the error: ERROR in command ['load', 'map']: module 'map' has no attribute 'init'.
If I run MAVProxy with both vehicles in the same console, I get the error: AP: PreArm: Main loop slow (222Hz < 300Hz).
If I run each vehicle in a separate console using different TCP ports, I can't issue commands to move the drone because it results in an abort (see attached photo).
Do you have any ideas on how to fix this?
Thank you
Screenshot 2024-08-09 alle 18 43 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants