Offboard Mode arm transition

Hello everyone,

I have a program in Offboard mode. I try to flight indoor with a vision system.

I developed code in a state machine form. Which analyse if I am in disarmStandby, disarmCounting, armedStandby, arming, etc… I try to reproduce the low rotation (PWM_MIN) from the base_mode which make the rotors turn at really low speed.

When I arm the vehicle, the rotors doesn’t turn has the base_mode does in Offboard mode. To implement this, I use the mavros_msgs/ActuatorControl and send from the Control Group #0. Then I have the rotors rotating at low speed.

After, I would like to automate my takeoff, with a trigger which would send a position to go. I use the mavros_msgs/PositionTarget topic. It is working pretty well in simulation, but I found a problem. There’s a delay before the PX4 accept the position send and by the time this position is accepted the rotors are commanded to stop (short period of time +/- 50ms), because the actuator control is dropped to control with a position target.

Here’s my dilemma, I cannot send both at the same time, since it will destroy the real rotors to receive On/Off command (but it is working in simulation). So for the moment, I have absolutely no idea how to remove this little burst of Off command during the transition.

I could remove the low speed rotation in ArmedStanby mode, but I think it is a nice look and feel for the pilot to have. Also, my drone is pretty UAV and requires a 68% hover, which I think would be hard on the rotors to go from 0us PWM to 1800us.

Do you guys have any idea or experience with that situation, if yes a little help would be appreciate.

Thank you