-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Invalid setpoint yaw after takeoff #7313
Comments
It seems that adding line Without changing the firmware, I was able to overcome the problem by sending few SET_POSITION_TARGET_LOCAL_NED messages with yaw set just after switching to offboard mode and return to sending yaw_rate only after short time. |
Could you add a pr on this? |
https://github.com/PX4/Firmware/blob/master/src/modules/navigator/mission_block.cpp#L528
I believe sp.yaw_valid should be set correctly in the MissionBlock::mission_item_to_position_setpoint according to (mission) item->yaw.
When yaw_valid is already true (in my case it was set when taking off using MAV_CMD_NAV_TAKEOFF) and mission_item_to_position_setpoint is called with mission item containing yaw=NAN (is happens whan take-off is finished: https://github.com/PX4/Firmware/blob/master/src/modules/navigator/takeoff.cpp#L95), the yaw remains set to NAN and the yaw_valid remains true. When I switch to offboard (without valid yaw set), NAN value from yaw propagates thru the control and causes invalidating attitude setpoint (most values are set to NAN). This leads to instant crash.
The text was updated successfully, but these errors were encountered: