Copter 4.2.x can't accept DO_CHANGE_SPEED in auto mission

Hi!! since i updated my copter 4.0.7 to 4.2.X i noticed that the drone does not follow the speed set in the mission commands(DO_CHANGE_SPEED). Anyone else with this problem? The same parameters with 4.0.7 work fine. My wpnav_speed is 12 but i can’t fly less than this in auto mode.

In this log i put 10m/s, send the mission some times but after takeoff did not hold the speed.

image

https://drive.google.com/drive/folders/1xc2GU7WrRolYATw4WuguHcoSWwUWlz-F?usp=sharing

Did you update mission planner as well?

I’m Running 1.3.77.1, i will try again witch a lastest version. I dont remember if i’ve tried with the last.

@vinnyferrari,

Thanks for the report. This is a real bug so well done uncovering it! I’ve created an issue here and this is almost undoubtedly caused by a change we made to the takeoff and landing code.

The work around until we have a fix is to add a WAYPOINT command immediately after the TAKEOFF with all zero lat, lon and alt. Then put the DO_CHANGE_SPEED after this all zero WAYPOINT command.
image

2 Likes

Hello @rmackay9,

This bug affects all 4.2.x Copter versions?

@BrunoBagarini,

Yes the bug is new for 4.2.0 and is present in all subsequent versions.

I discussed with Leonard and we have a plan to fix it but it will require moving where we hold the latest desired speed from the waypoint controller up into the Auto mode. This is not a huge change but it will require some careful testing.

1 Like

@rmackay9, I am very close to submitting a PR for a Lua binding that interacts with some of these methods (set_desired_speed for Rover and set_speed_xy for Copter) - effectively giving us DO_CHANGE_SPEED functionality in scripting, as we discussed earlier this year. It is implemented much like the guided mode bindings that already exist.

Is the bug fix impactful enough to warrant waiting for it before I submit the PR?

1 Like

@Yuri_Rage,

Sounds good. In general our rule is “first person with a PR wins!” so feel free to raise that and I’ll handle any merge conflicts that arise.

Ok! I think it’s ready for submission, but I’d like to test an example script for inclusion with the PR, and I didn’t quite finish that today. Thanks to @iampete, of course, for a little guidance earlier as well!

1 Like

For some reason change speed is bugged since ages. It just works random. What i find sometimes helps is using not round numbers for speed. Try 10.2 or something similar.
This bug is present since at least 3 years ago.

Ok @rmackay9

Thanks a lot for the information!