fix(navigator): MIS_YAW_TMT 0 means don't wait

This commit is contained in:
Matthias Grob committed 2026-11-05 16:54:27 +01:00
1 parent cd7a716749
commit 0c28c677c6
5 files changed
+11 -3

No files matched your search

+1 -1
View File
@@ -233,7 +233,7 @@ If getting to the waypoint takes longer than `MIS_YAW_TMT`, the vehicle does not
Some headings must be reached for the mission to continue safely, such as the alignment towards the next waypoint before a mission with camera triggering is resumed.
If such a heading is not reached within `MIS_YAW_TMT`, the mission fails and the vehicle switches to [Return mode](../flight_modes_mc/return.md).
Set `MIS_YAW_TMT` to -1 to always wait for the heading.
Set `MIS_YAW_TMT` to 0 to never wait for a heading, or to -1 to always wait for it.
<Badge type="tip" text="main (PX4 v2.0)" />
## Rounded turns: Inter-Waypoint Trajectory
+1
View File
@@ -70,6 +70,7 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
The meaning of parameter values changes:
- Multicopters with `MIS_YAW_TMT` set above `0` used to skip all headings that the mission does not require. They now wait for them for up to `MIS_YAW_TMT`.
- VTOL vehicles in multicopter mode now always skip headings that the mission does not require, even with `MIS_YAW_TMT` set to `-1`.
- `MIS_YAW_TMT` set to `0` used to wait indefinitely, like `-1`. It now means not to wait.
- Set `MIS_YAW_TMT` to `-1` to keep waiting indefinitely for headings that are awaited.
See [Mission Mode > Waypoint Heading Timeout](../flight_modes_mc/mission.md#waypoint-heading-timeout).
+1 -1
View File
@@ -410,7 +410,7 @@ MissionBlock::is_mission_item_reached_or_completed()
&& _navigator->get_local_position()->heading_good_for_control) {
const float yaw_err = wrap_pi(_mission_item.yaw - _navigator->get_local_position()->heading);
const bool yaw_timed_out = (_navigator->get_yaw_timeout() >= FLT_EPSILON)
const bool yaw_timed_out = (_navigator->get_yaw_timeout() >= 0.f) // negative disables the timeout
&& (now > _time_item_started + (hrt_abstime)(_navigator->get_yaw_timeout() * 1_s));
// Accept yaw if reached, VTOLs only care about forced headings
+1 -1
View File
@@ -69,7 +69,7 @@ parameters:
A forced heading (e.g. before a VTOL transition) is never skipped: a mission fails instead,
other modes keep waiting.
VTOLs only wait for forced headings.
-1: wait indefinitely
0: don't wait, -1: wait indefinitely
type: float
default: 10.0
unit: s
@@ -284,6 +284,13 @@ TEST_F(MissionBlockYawTest, DisabledTimeoutWaitsIndefinitely)
EXPECT_FALSE(_block.reached());
}
TEST_F(MissionBlockYawTest, ZeroTimeoutDoesNotWait)
{
setYawTimeout(0.f);
_block.reached(); // first check is when the heading got commanded
EXPECT_TRUE(_block.reached());
}
TEST_F(MissionBlockYawTest, ResetRestartsTimeout)
{
EXPECT_FALSE(_block.reached());