Quadcopter motors stop at throttle up

Hi,

I’ve been working on modifying the Ardupilot software, more specifically the attitude controller in the AC_AttitudeControl.cpp file. I should mention that I’m using an older commit of Ardupilot (acf2e10) as it just happens to be more suitable for my purposes. I had just uploaded some new code to the quadcopter board (PX4, compiled using PX4 console and the “make” command), which I had tested beforehand using the SITL simulator via the cygwin terminal. When I tried it on the actual quadcopter however the arm procedure and everything else would be as usual, and the light on the front would be flashing green, and the motors would start idling, but when I attempted to throttle up the motors would suddenly stop at about one-third to half throttle. The ground station (mission planner) would give no error messages and the only indication that something was wrong (except for the motors not spinning) would be a short beeping sound from the quadcopter about once every five seconds. The only way I could re-arm it was by powering off the board and powering it on again, but regardless the problem would repeat every time I tried to throttle it up.

Obviously there is something wrong with the code, since the quadcopter flies just fine using the original code, but I have flown modified code before, even code that was downright faulty resulting in an immediate tip-over, and never have I had this problem before. Furthermore the code seemed to work fine in the SITL simulator.

Does anyone recognize this problem/has experienced it before, or might you know what this problem might be an indicator of? Is it possibly a built-in Ardupilot safety switch, or an indication of a software crash?

Thanks,
R.

2016-10-17 17-22-30.bin (120 KB)

As can be seen in the logs the “Thrust Out” parameter seems to be consistently half of the “Thrust In” parameter, up until the point where the motors cut out. The quadcopter does also sound somewhat under-powered when I try and lift off. I fail to see how a change in AC_AttitudeControl.cpp would cause this error, since it should not affect the take-off thrust.