Changing throttle from Servo 3 in Sim on Hardware


I am following the guide here Simulation on Hardware — Dev documentation

In the system I am working on, Servo 3 is mapped to a GPIO and we need to use Servo 6 to be the throttle. Just changing the SERVO6_FUNCTION parameter to 70 and RCMAP_THROTTLE to 6 doesn’t seem to be doing the trick. Everything loads and boots up correctly and there are no prearm check failures. On doing arm throttle, rc 3 or rc 6 1500 and then mode takeoff, it changes the mode but doesn’t move the sim at all.

I am thinking there’s something more that needs to be changed for throttle, since the control surfaces like aileron and elevator were pretty straightforward SERVOX_FUNCTION param changes.

If I change RCMAP and SERVO3_FUNCTION to be what they are originally even while it is in the frozen takeoff, it immediately starts to fly.

To reproduce, Follow the steps on the link to flash your board and change the SERVO3_FUNCTION(-1), SERVO6_FUNCTION(70) and RCMAP_THROTTLE(6) parameters, reboot and try to takeoff. I am using a Pixhawk6X. And my firmware building command is

./Tools/scripts/sitl-on-hardware/ --board Pixhawk6X --vehicle plane --simclass Plane --frame plane --defaults ./Tools/scripts/sitl-on-hardware/plane-default.param

I would really appreciate any help. Thank you!

Without being 100% sure, I suspect that the simulated airplane “expects” its thrust to come from a motor that is connected to Servo 3. Maybe it’s not smart enough to read SERVO6_FUNCTION and realize the motor has been moved.
Since that output is idle, it produces no thrust.