Skip to content

Report GNSS fixes at the antenna position - #13

Merged
JaidenAGrimminck merged 1 commit into
mainfrom
gnss-antenna-position
Oct 16, 2026
Merged

JaidenAGrimminck merged 1 commit into
mainfrom
gnss-antenna-position

Conversation

@clmazzac

Copy link
Copy Markdown
Member

Problem

buildGnssMeasurement used the base_link position and ignored the GNSS sensor's mount pose. A real receiver reports the antenna position. An antenna mounted away from base_link therefore gives an offset that changes with heading.

Measured on main with the antenna 1 m ahead of base_link and the car facing north: the fix is at 0 m north, not 1 m.

Fix

The fix position is now the base_link position plus the mount offset (sensorConfig.pose.position), rotated into the map frame by the vehicle orientation. It uses the existing rotateVectorByQuaternion helper.

Checked with a local script, outside the repo (expected value in brackets):

Heading Mount (forward, left, up) Fix east, north, up
East (1, 0, 0) 1.0, 0, 0 [1, 0, 0]
North (1, 0, 0) 0, 1.0, 0 [0, 1, 0]
North (0, 0.5, 1.2) -0.5, 0, 1.2 [-0.5, 0, 1.2]
West (1, 0, 0) -1.0, 0, 0 [-1, 0, 0]

Effect on existing runs

The default GNSS mount is (0, 0, 0.5). Default fixes now report 0.5 m more altitude. On flat ground the horizontal position does not change. On a pitched road, the horizontal fix moves by 0.5 m × sin(pitch).

Tests

  • npm test on a clean copy of main with this and the other open sensor PRs merged: 1968 pass, 6 skipped, 1 fail. The failure is Python decodes retained RGB, depth, and CameraInfo SFLog messages, which also fails on main.
  • No unit test is added in this PR.

🤖 Generated with Claude Code

GNSS fixes used the base_link position and ignored the sensor's mount
pose. A real receiver reports the antenna position, so an antenna mounted
away from base_link gives a heading-dependent offset.

The fix now adds the mount offset, rotated by the vehicle orientation, to
the base_link position. The default GNSS mount is 0.5 m above base_link,
so default fixes report 0.5 m more altitude.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JaidenAGrimminck

Copy link
Copy Markdown
Member

okay yeah important lol

@JaidenAGrimminck
JaidenAGrimminck merged commit bb3ac97 into main Oct 16, 2026
7 of 8 checks passed
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.

2 participants