Skip to content

fix(autoware_gnss_poser): publish no pose for the first position with orientation_source motion - #23

Open
kentdotn wants to merge 1 commit into
feat/gnss-poser-orientation-sourcefrom
fix/gnss-poser-motion-waits-for-second-fix
Open

kentdotn wants to merge 1 commit into
feat/gnss-poser-orientation-sourcefrom
fix/gnss-poser-motion-waits-for-second-fix

Conversation

@kentdotn

@kentdotn kentdotn commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Description

Purpose

With orientation_source: motion (formerly use_gnss_ins_orientation: false) the heading is the direction of the displacement from the previous position. The first position has no previous one, so it was given a zero displacement and published heading east (atan2(0, 0) = 0), with the same covariance as a real heading. A consumer cannot tell that pose from one that is actually heading east, and the east heading also enters the antenna -> base_link lever-arm correction.

As agreed with the localization maintainers, motion publishes nothing until the second position.

What this changes

  • GnssPoser::input_fix() with OrientationSource::Motion: the first position yields Outcome::NoOrientation (introduced in the previous PR for ins) with gnss_fixed only, and is kept as the previous position. The second position gets the heading of the first step.
  • With a buffer (average / median) the first position is the first reduced one, as before; so with buff_epoch = N the first pose now comes with the (N+1)-th fix instead of the N-th.
  • The node's throttled log for NoOrientation names both reasons; the README and schema say that motion has no pose for the first position.

The heading algorithm itself is unchanged (atan2 of the latest step, east when standing still, constant covariance 0.1 / 0.1 / 1.0); improving it was agreed to be a separate topic.

Tests changed on purpose

Before After
MotionOrientation_FirstFix_IdentityAndConstantCovariance (unit) MotionOrientation_FirstFix_PublishesOnlyGnssFixed; it fails against the previous behavior (the outcome is Published and a pose is present)
— the constant motion covariance is now checked in MotionOrientation_CardinalDirection_YawFromDisplacement, on the second fix
comments "First fix: ... identity" in the other motion cases "First fix: no previous position => no pose"; their assertions are on later fixes and unchanged
Construct_OrientationSourceParameters_SelectsTheSource/Motion, /LegacyFalse (integration) motion publishes only the second pose of the scenario

Related links

How was this PR tested?

  • colcon test: 45 unit + 42 node instances pass, plus the ament linters.
  • The new first-fix case run against the previous commit's logic fails as expected.
  • clang-format 21.1.8, cpplint 2.0.2 and prettier on the README and schema pass.

Interface changes

None (no parameter, topic or message change). orientation_source: motion publishes one pose less at start-up.

Effects on system behavior

With orientation_source: motion, or use_gnss_ins_orientation: false, the first pose after start-up (the first after the buffer fills, with average / median) is no longer published. Every later pose is unchanged. Other sources are not affected.

🤖 Generated with Claude Code

@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from 1511070 to 49eaf0b Compare October 28, 2026 01:50
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch 2 times, most recently from 80752b2 to b721d6f Compare October 29, 2026 06:47
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch 2 times, most recently from 8fc1d71 to 87a3703 Compare October 29, 2026 07:45
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch 2 times, most recently from 53853d8 to e38c50d Compare October 30, 2026 02:05
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch 2 times, most recently from 94351ff to 58c2764 Compare November 2, 2026 10:21
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch 2 times, most recently from 52d5713 to 8ad9242 Compare November 2, 2026 11:01
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from 58c2764 to f490a0c Compare November 2, 2026 11:01
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from 8ad9242 to f3bae4f Compare November 2, 2026 11:42
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch 2 times, most recently from 1674619 to 8efcc3d Compare November 4, 2026 06:11
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from f3bae4f to 9c5d7fe Compare November 4, 2026 06:11
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from 8efcc3d to d916617 Compare November 5, 2026 05:43
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch 2 times, most recently from 0044ca2 to 51e5933 Compare November 5, 2026 10:30
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from d916617 to 4374040 Compare November 5, 2026 10:30
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from 51e5933 to dba8681 Compare November 5, 2026 11:25
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch 2 times, most recently from 6937aec to ac3f81d Compare November 6, 2026 08:46
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from dba8681 to 94af64f Compare November 6, 2026 08:46
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from ac3f81d to 9d332c3 Compare November 9, 2026 07:53
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from 94af64f to 916b996 Compare November 9, 2026 07:53
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from 9d332c3 to d82136a Compare November 16, 2026 05:22
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from 916b996 to a090dd6 Compare November 16, 2026 05:22
@github-actions

Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

1 similar comment
@github-actions

Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@github-actions

Copy link
Copy Markdown

@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from a090dd6 to ef2b433 Compare November 17, 2026 05:08
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from d82136a to a52c8a9 Compare November 17, 2026 05:08
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from a52c8a9 to ab9016a Compare November 30, 2026 07:08
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from ef2b433 to 7088738 Compare November 30, 2026 07:08
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from ab9016a to 501a2bf Compare November 30, 2026 07:50
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from 7088738 to d981286 Compare November 30, 2026 07:50
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from 501a2bf to 85e3e79 Compare November 30, 2026 08:48
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from d981286 to 23875f5 Compare November 30, 2026 08:48
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from 85e3e79 to 5dfcb97 Compare November 30, 2026 09:05
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch 2 times, most recently from 21b38a1 to dfd7f2a Compare December 1, 2026 05:00
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from 5dfcb97 to bb7acc5 Compare December 1, 2026 05:00
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from dfd7f2a to f136bf7 Compare December 2, 2026 07:41
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from bb7acc5 to 1ab6273 Compare December 2, 2026 07:41
… orientation_source motion

With orientation_source motion (use_gnss_ins_orientation = false) the
heading is the direction of the displacement from the previous position.
The first position has none, so it was given a zero displacement and
published heading east (atan2(0, 0) = 0) with the same covariance as a
real heading. A consumer could not tell that pose from one that was
actually heading east.

Publish no pose for it instead: input_fix() returns
Outcome::NoOrientation with gnss_fixed only, and keeps the position as
the previous one, so the second position gets the heading of the first
step. With a buffer the first position is the first reduced one, as
before.

The heading itself (atan2 of the latest step, east when standing still,
constant covariance) is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kentaro NAGATOMO <kentaro.nagatomo@tier4.jp>
@kentdotn
kentdotn force-pushed the fix/gnss-poser-motion-waits-for-second-fix branch from 1ab6273 to c2affd5 Compare December 2, 2026 08:03
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from f136bf7 to 15cc34e Compare December 2, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant