Servo doesn't move, SET_ATTITUDE_TARGET mavlink message doesn't work

Hi all, I have wasted several WEEKS trying to resolve my issue, I read almost everything I could find in web, so finally have to ask your help.

I have the Fixed Wing plane with Pixhawk 2.4.8 and RPI 3 as a companion computer. RC transmitter is not used. GPS sensor is not used too. HIL simulation is disabled. Since I have not received all servos yet, I have connected only one servo (the elevator servo, main out PIN #2) to the Pixhawk. But this should not be the problem, right? I have installed the ArduPlane 4.3.1 to the Pixhawk, the Pixhawk1 build (not the Pixhawk1-1M).

Using Ardupilotmega C library, I developed the C program. So there I set mode to GUIDED (MAV_CMD_DO_SET_MODE command), it works fine. I ARM the vehicle (MAV_CMD_COMPONENT_ARM_DISARM command) and it works fine. But then SET_ATTITUDE_TARGET mavlink message does NOT make elevator servo to move.

Ok, I digged where is the problem and noticed the state 5 (MAV_STATE_CRITICAL: System is in a non-normal flight mode. It can however still navigate.) in the mavlink heartbeat message. After long hours of search I noticed that RC failsafe was enabled and disabled it. So the Pixhawk big light indicator changed to the blinked blue (DISARMED no-GPS) and light becomes solid after arming. The heartbeat state was changed to 3 (MAV_STATE_STANDBY: System is grounded and on standby. It can be launched any time.) But elevator servo does not move with SET_ATTITUDE_TARGET too.

Then I added the MAV_CMD_NAV_TAKEOFF before the set_attitude_target message, so algorithm became like that:

  • change mode to GUIDED (ok)
  • ARM vehicle (ok)
  • MAV_CMD_NAV_TAKEOFF command (ok)
  • SET_ATTITUDE_TARGET message (fail)

I receive from the Pixhawk reply to MAV_CMD_NAV_TAKEOFF command: ACK, result: 0, which means this command processed successfully. But SET_ATTITUDE_TARGET still refuses to work, the elevetor servo does not move, the heartbeat status still is MAV_STATE_STANDBY.

I tried to move the elevator servo with MANUAL, FBWA, FBWB modes, I tried message RC_CHANNELS_OVERRIDE and command MAV_CMD_DO_SET_SERVO strictly according to the documentation, but no success, the elevator servo still is dead.

Then I tried to use Mavproxy.py instead of C program, I used the commands “rc N PWM” and “servo set N PWM” on armed vehicle, but no success.

Please help, guys. Any help is very appreciated.

Did you ever solve this? I have some problems I can’t quite figure out too. See How can I control my plane in FBWA mode