Skip to content

feat(autoware_gnss_poser): select the orientation source with orientation_source - #22

Open
kentdotn wants to merge 1 commit into
mainfrom
feat/gnss-poser-orientation-source
Open

kentdotn wants to merge 1 commit into
mainfrom
feat/gnss-poser-orientation-source

Conversation

@kentdotn

@kentdotn kentdotn commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Description

Purpose

This PR stops filling in an unknown orientation silently, and makes the orientation parameters say what the node does:

  • A new parameter orientation_source names the source explicitly (ins, motion, none). The old parameter keeps working but is deprecated. The mixed mode that use_gnss_ins_orientation: true gives (INS once it has arrived, a fixed orientation until then) has no orientation_source value, so it goes away together with the old parameter.
  • With the INS as the source, no pose is published until the first INS orientation has arrived, instead of a fixed orientation standing in for it.
  • A fixed orientation (the identity, heading east, with an rmse of 1.0 rad) is published only when the configuration asks for it: none, or the deprecated use_gnss_ins_orientation: true before the first INS orientation. none is kept because consumers that use only the position still need a pose from a vehicle without an INS, and PoseStamped has no way to say that the orientation is unknown.

The new parameter set was agreed with the localization maintainers.

Compatibility, in short (details below):

  • A configuration that sets only use_gnss_ins_orientation keeps its behavior (false is read as motion, true keeps the mixed mode) and logs a deprecation warning.
  • The shipped param file sets orientation_source: none. A vehicle without an INS sees the same pose as before; a vehicle with an INS that uses the shipped file loses the INS orientation, is warned once, and should set ins.

Current behavior

  • use_gnss_ins_orientation: true publishes a pose before the first autoware_orientation has arrived, with the identity orientation (heading east) and an rmse of 1.0 rad standing in for it. A consumer cannot tell that stand-in from a measured orientation, and a vehicle that sets the parameter to true but publishes no autoware_orientation gets it on every fix.
  • The boolean hides the third behavior the node has: "INS if available, otherwise a fixed orientation".

What this adds

orientation_source (string):

Value Orientation Rotation covariance
ins the latest autoware_orientation; no pose until the first one has arrived its rmse_rotation_* squared
motion the heading of the displacement, as use_gnss_ins_orientation: false did 0.1, 0.1, 1.0 rad^2
none unknown: the identity, with an rmse of 1.0 rad 1.0, 1.0, 1.0 rad^2

use_gnss_ins_orientation: true keeps what it did: ins once autoware_orientation has arrived, none until then. No orientation_source value selects it, so that a configuration moving to the new parameter does not adopt the deprecated behavior and has to migrate again when the old parameter is removed.

Logic (GnssPoser):

  • GnssPoserParams::use_gnss_ins_orientation becomes orientation_source (OrientationSource::{Ins, Motion, None, InsOrNone}; InsOrNone is selected only by use_gnss_ins_orientation: true).
  • ins before the first INS orientation yields the new Outcome::NoOrientation: gnss_fixed only, no pose. The fix still enters the position buffer, as for a fix whose antenna transform cannot be looked up.
  • The identity-with-rmse-1.0 stand-in is no longer written into the stored INS orientation by the constructor; the unknown orientation is computed where it is used (none, and InsOrNone before the first message). GnssPoserCovarianceDefaults::ins_placeholder_rmse keeps its value and now documents both uses.

Node:

  • orientation_source and use_gnss_ins_orientation are both declared without a default, and either one is enough:
    • only orientation_source: used as given; any other value than the three makes the node fail to start.
    • only use_gnss_ins_orientation: false is read as motion, true keeps the mixed mode (InsOrNone); either logs a deprecation warning, which for true names ins and none as the replacements. Existing configurations (for example in autoware_launch) keep their behavior.
    • both: orientation_source wins, and a warning says the old one is ignored.
    • neither: the node fails to start, as for any other missing parameter.
  • The source is read before the TF listener starts, next to base_frame and the GnssPoser parameters, so that an invalid value throws before the listener thread exists (fix(autoware_gnss_poser): read the parameters before the TF listener starts autowarefoundation/autoware_core#1556).
  • config/gnss_poser.param.yaml sets orientation_source: none and no longer sets use_gnss_ins_orientation. The schema, design file and README follow.

Logs:

  • At startup, the source in use (INFO), after reading the old parameter if needed.
  • Once, when autoware_orientation arrives while the source is none (WARN): it is ignored, which probably is not what the configuration meant.
  • ins before the first INS orientation: the throttled WARN of Outcome::NoOrientation ("Output Skipped"), like the other outcomes without a pose.

Tests changed on purpose

Before After
InsOrientation_NoMessageYet_IdentityAndUnitCovariance (unit, with a NOTE(characterization)) UnknownOrientation_IdentityAndUnitCovariance (TEST_P: none with an INS orientation that is ignored, InsOrNone before the first one); the note is gone, the mode it described is now what only the deprecated use_gnss_ins_orientation: true selects
— InsOrientation_NoMessageYet_PublishesOnlyGnssFixed (unit): ins waits for the first INS orientation
InsOrientation_NewerMessage_ReplacesPrevious (unit) the same case as a TEST_P over Ins and InsOrNone
Covariance_* (unit) set an INS orientation and Covariance_UnknownType_* checked the rotation variances they no longer do: the rotation variances belong to the orientation cases
— Construct_OrientationSourceParameters_SelectsTheSource (integration, TEST_P): each value, the two values of the old parameter and both parameters set. The source in use shows in the poses of one scenario (a fix, the INS orientation, a fix to the north): ins publishes only the second, with the INS yaw; none the identity twice; motion and the old false the identity, then the heading of the step; the old true the identity, then the INS yaw. Its fixes are in the default frame gnss, which autowarefoundation#1523 drops without a transform, so it first publishes the identity as the static TF gnss -> base_link, as the two cases of autowarefoundation#1523 that publish a pose do
— Construct_UnknownOrientationSource_FailsToStart (integration, TEST_P): Ins, gyro, the empty string
Construct_*, Tf_StaticAntennaToBaseTransform_* (integration) set orientation_source instead of use_gnss_ins_orientation; the cases that send an INS orientation set ins

Related links

How was this PR tested?

  • colcon test: 45 unit + 42 node instances pass, plus the ament linters.
  • clang-format 21.1.8, cpplint 2.0.2 and prettier on the README, schema and yaml files pass.

Interface changes

  • New parameter orientation_source (ins | motion | none), shipped as none.
  • use_gnss_ins_orientation is deprecated and no longer in the shipped param file; it is still read when orientation_source is not set.
  • The parameter schema requires one of the two (anyOf) instead of orientation_source, so a param file that sets only use_gnss_ins_orientation still validates, and one that sets neither does not, as the node accepts them.
  • The node design (design/GnssPoser.node.yaml) declares orientation_source (default none) in param_values instead of use_gnss_ins_orientation. A system design that sets use_gnss_ins_orientation through param_values has to set orientation_source instead.

Effects on system behavior

  • With the shipped param file the source is now none (it was use_gnss_ins_orientation: true, the mixed mode). A vehicle that publishes no autoware_orientation sees no change in the published pose. A vehicle that does publish it and uses the shipped file loses the INS orientation, and the node warns about it once; such a vehicle should set orientation_source: ins.
  • Configurations that set only use_gnss_ins_orientation behave as before and log a deprecation warning at startup.

🤖 Generated with Claude Code

@kentdotn
kentdotn force-pushed the fix/gnss-poser-drop-fix-without-antenna-transform branch from 97c57a2 to 68c6178 Compare October 28, 2026 01:50
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from 173c359 to 80752b2 Compare October 28, 2026 01:50
@kentdotn
kentdotn force-pushed the fix/gnss-poser-drop-fix-without-antenna-transform branch from 68c6178 to ddb8b6d Compare October 29, 2026 06:47
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from 80752b2 to b721d6f Compare October 29, 2026 06:47
@kentdotn
kentdotn force-pushed the fix/gnss-poser-drop-fix-without-antenna-transform branch from ddb8b6d to bba83cc 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-drop-fix-without-antenna-transform branch 2 times, most recently from 396e2ab to fb009fc 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-drop-fix-without-antenna-transform branch from fb009fc to 78b8e7f 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-drop-fix-without-antenna-transform branch from 78b8e7f to 245f1d8 Compare November 2, 2026 11:42
@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-drop-fix-without-antenna-transform branch 2 times, most recently from 6b149f9 to c57ead9 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-drop-fix-without-antenna-transform branch from c57ead9 to 1190cbd 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-drop-fix-without-antenna-transform branch 2 times, most recently from d6fdd10 to 09c6c5f Compare November 6, 2026 08:46
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch 2 times, most recently from 94af64f to 916b996 Compare November 9, 2026 07:53
@kentdotn
kentdotn force-pushed the fix/gnss-poser-drop-fix-without-antenna-transform branch from 09c6c5f to 34c02ab Compare November 9, 2026 07:53
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch from 916b996 to a090dd6 Compare November 16, 2026 05:22
@kentdotn
kentdotn force-pushed the fix/gnss-poser-drop-fix-without-antenna-transform branch from 34c02ab to 117bd88 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:

@github-actions

Copy link
Copy Markdown

@kentdotn
kentdotn changed the base branch from fix/gnss-poser-drop-fix-without-antenna-transform to try/gnss-poser-drop-then-report November 17, 2026 05:08
@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 try/gnss-poser-drop-then-report branch from cb14f60 to 8c8f510 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 changed the base branch from try/gnss-poser-drop-then-report to main November 30, 2026 07:50
@kentdotn
kentdotn force-pushed the feat/gnss-poser-orientation-source branch 5 times, most recently from dfd7f2a to f136bf7 Compare December 2, 2026 07:41
…tion_source

use_gnss_ins_orientation = true published a pose before the first
autoware_orientation arrived, with the identity orientation and an rmse
of 1.0 rad standing in for it. A consumer cannot tell that stand-in from
a measured orientation, and vehicles that set the parameter to true but
publish no autoware_orientation always get it.

The new parameter orientation_source says where the orientation comes
from:

- ins: the latest autoware_orientation. No pose until the first one has
  arrived (Outcome::NoOrientation; gnss_fixed is still published).
- motion: the heading of the displacement, as use_gnss_ins_orientation =
  false did.
- none: unknown, the identity with an rmse of 1.0 rad. The shipped
  default.

use_gnss_ins_orientation is deprecated. When orientation_source is not
set it is still read, with a warning at startup: false as motion, and
true as what it did (ins once autoware_orientation has arrived, none
until then). No orientation_source value selects that mixed mode, so it
goes away together with the old parameter. When both are set the old
parameter is ignored. The node declares both without a default, so a
configuration needs one of them.

The node logs the source in use at startup, and warns once when
autoware_orientation arrives while the source is none and is ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kentaro NAGATOMO <kentaro.nagatomo@tier4.jp>
@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