-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multicopter takes off in HOLD on ground #11197
Comments
It seems that the issue is caused by an other bug, but the changes from 5887a23 makes it now visible. |
Ok, what do you suggest to fix it? |
No suggestion, except of finding the bug. I only spent a couple minutes on trying to find the bug, so I hope that on monday I will figure it out. If it is a time critical issue, then we could revert it |
Ok thanks. Maybe @MaEtUgR has an idea too. |
@julianoes I found this issue as well when I did some SDK tests such that I learn how to eventually add orbit. Can you check if #11206 fixes it? |
@MaEtUgR, as i wrote above, the reason is a thrust-setpoint of 0. If you are in hold, the thrust setpoint should be NAN, otherwise the logic breaks. |
By the way, if you are in hold during flight, the thrust setpoint is NAN as expected. This, however, is not the case if the drone is put into Hold mode before arming... |
Strange 🤔 I found the minimal revert hotfix: #11207 |
Ok, I know now what module causes it. @bresch, can you look into it. I think this bug justifies my concern of having two code paths for Auto (AutoMapper vs AutoMapper2) despite sharing similar or even the same functionalities. |
By the way, this kind of bug can be captured with the integration-test ulog pipeline. |
@bresch It's because the zero thrust point of https://github.com/PX4/Firmware/blob/master/src/lib/FlightTasks/tasks/AutoMapper2/FlightTaskAutoMapper2.cpp#L120 gets through when you arm in hold mode. The same line also exists in AutoMapper(1) but for some reason it doesn't get executed in that situation. We should have only one "mapper" implementation if they are copies of each other with the same goal (#11209). |
@bresch @MaEtUgR in Automapper, the thrust will be set to NAN if the state changes from idle to any other state: https://github.com/PX4/Firmware/blob/master/src/lib/FlightTasks/tasks/AutoMapper2/FlightTaskAutoMapper2.cpp#L61-L62 |
@Stifael The issue was not in the AutoMapper but in how the AutoLineSmoothVel FlightTask handled the case where a position setpoint and a velocity setpoint is NAN. That was considered as an unknown command and the velocity setpoint was forced to zero. |
I found a regression while running the Dronecode SDK integration tests. Before arming, the SDK sets PX4 into HOLD mode. That way we make sure that a drone does not shoot up right after being armed but always sits on ground and just spins the motors in idle, so this is a safety precaution.
However, after 5887a23 the drone suddenly starts hovering right after arming even though it's in HOLD mode.
The SDK command to test this is:
FYI: @Stifael
https://logs.px4.io/plot_app?log=c387cdf8-120a-4aab-90ca-bcfb559a5ea5
The text was updated successfully, but these errors were encountered: