I am testing ArduCopter in SITL using pymavlink and I am experiencing an approximately 3-second delay after the vehicle is armed before it starts responding to my takeoff/control commands.
I need to minimize the latency between the moment the vehicle becomes armed and the moment it starts producing the expected thrust/movement.
The sequence currently looks like this:
Connect to SITL via MAVLink.
Wait for a heartbeat.
Send the ARM command.
Receive confirmation that the vehicle is armed.
Send the takeoff/control commands.
The vehicle does not start moving immediately.
After approximately 3 seconds, the vehicle finally starts responding.
I would like to understand what causes this delay and whether it is expected ArduCopter behavior or something that can be configured/optimized in SITL.
Environment
ArduCopter: SITL
Firmware version: ArduCopter V4.8.0-dev
Interface: MAVLink over UDP
Python: pymavlink
Control loop: 100 Hz
Connection: udp:127.0.0.1:14551