mavlink / MAVSDK

API and library for MAVLink compatible systems written in C++17
https://mavsdk.mavlink.io
BSD 3-Clause "New" or "Revised" License
633 stars 510 forks source link

Set flight mode to HOLD after drone disarms #1922

Closed YalamareddyChaitanya closed 2 years ago

YalamareddyChaitanya commented 2 years ago

I am trying to set the flight mode to HOLD using action->hold() after the mission is completed . Right now I am waiting approximately 4 seconds after drone disarms to set the flight mode. But the hold command is temporarily rejected by the vehicle sometimes. But action->hold() works after some time. Do I have to wait for more time after drone disarms before setting flight mode to hold? or Are there any further things to be considered to set flight mode after disarming?

PX4 : 1.13.0 MAVSDK: 1.4.6

julianoes commented 2 years ago

I don't know, good question :smile:. I'd try it in SITL a bit and play around to see if I can find anything...

YalamareddyChaitanya commented 2 years ago

@julianoes It always works with SITL. It did not work with the drone just for a day. Since then it has been working well. I close the issue for now. I will reopen the issue if this problem reappears.