Skip to content
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

amsl_origin and utm_origin now correctly use altitude from RTK instead of GNSS #15

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

petrlmat
Copy link
Member

@petrlmat petrlmat commented Nov 7, 2024

Merge only when we verify that this works in real world. So far we have tested it in sim only.

  • This concerns only EMLID RTK receivers. Holybro F9P is not affected as it is connected into pixhawk and not into NUC.
  • So far, the amsl transformations (amsl_origin, utm_origin) published by transform_manager were based on the topic hw_api/altitude, which was based on the GNSS altitude reported by mavros/pixhawk.
  • Now, when RTK is available (it is in the list of state estimators in custom config), the RTK altitude will be used instead.
  • The altitude is using the tf fcu -> rtk_antenna to transform the measurements received by the antenna into the fcu frame, which is typically offset vertically on the drones.
  • The fcu -> rtk_antenna tf was previously published from sensors.launch but I deleted the tf from the launch file because it is drone-specific and thus is the responsibility of the user to provide them in the tmux session. If the tf is not provided, transform manager will crash and inform the user to provide the tf.
  • Affected tfs: fcu -> amsl_origin - contains only the amsl altitude (no xy position or orientation), fcu -> utm_origin - contains the amsl altitude, the xy position in the utm frame (latlon converted to meters), and the orientation.
  • EMLID uses the WGS84 ellipsoid model for altitude and we don't do any conversion, so our altitude is also in WGS84. Pixhawk uses geographiclib to convert GNSS WGS84 data into some geoid model (one of EGM2008, EGM96, EGM84), so the altitude in hw_api/gnss (pixhawk) and hw_api/rtk (emlid) will differ by tens of meters (depending on the location).

@petrlmat petrlmat self-assigned this Nov 7, 2024
@petrlmat petrlmat added the bug Something isn't working label Nov 7, 2024
@petrlmat petrlmat merged commit e32a962 into master Dec 18, 2024
1 of 2 checks passed
@klaxalk
Copy link
Member

klaxalk commented Dec 19, 2024

@petrlmat Could you pls reflect the changes (the points in the PR) somewhere in the docs https://ctu-mrs.github.io/?

@petrlmat
Copy link
Member Author

I'm thinking about how to communicate this and similar changes. I'm not sure if writing the changes directly into the documentation is the best approach. Shouldn't the documentation list only the current state of the system? I thought that the blog would be most useful for that and then maybe in changelog when a new stable version is released?

@klaxalk
Copy link
Member

klaxalk commented Dec 20, 2024

@petrlmat ye the blog would be the right place to document changes. The documentation allows versioning, so the the new state should be reflected in the "upcoming" version (I have not yet figured out how to properly distinguish the current unnumbered rolling version... now it is the right time to do it)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants