Skip to content

Allow setting global origin of MAVLink vehicles#2162

Merged
rafaellehmkuhl merged 4 commits into
bluerobotics:masterfrom
rafaellehmkuhl:allow-setting-global-origin-mavlink-map
Oct 10, 2025
Merged

Allow setting global origin of MAVLink vehicles#2162
rafaellehmkuhl merged 4 commits into
bluerobotics:masterfrom
rafaellehmkuhl:allow-setting-global-origin-mavlink-map

Conversation

@rafaellehmkuhl

@rafaellehmkuhl rafaellehmkuhl commented Oct 2, 2025

Copy link
Copy Markdown
Member
Kapture.2025-10-02.at.09.46.34.mp4

Despite implemented, this feature is not working yet, as it needs support for the MAV_CMD_SET_GLOBAL_ORIGIN command on mavlink2rest. @patrickelectric is working on a new version with support for it.

I removed the await in the save button for the screen recording, but in reality it will be in a loading state for 5 seconds and then gently fail (because of the lack of support on m2r).

Fix #1102

@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-setting-global-origin-mavlink-map branch from 0c2e470 to c215010 Compare October 2, 2025 12:47
@ES-Alexander

Copy link
Copy Markdown
Contributor

Despite implemented, this feature is not working yet, as it needs support for the MAV_CMD_SET_GLOBAL_ORIGIN command on mavlink2rest. @patrickelectric is working on a new version with support for it.

If that's the case, I'm very confused how the DVL extension has supposedly supported it for years...

@ES-Alexander ES-Alexander added the docs-needed Change needs to be documented label Oct 2, 2025
@rafaellehmkuhl

Copy link
Copy Markdown
Member Author

Despite implemented, this feature is not working yet, as it needs support for the MAV_CMD_SET_GLOBAL_ORIGIN command on mavlink2rest. @patrickelectric is working on a new version with support for it.

If that's the case, I'm very confused how the DVL extension has supposedly supported it for years...

@Williangalvani is the DVL extension using mavlink2rest to send this message or it is directly injecting in the MAVLink stream?

@rafaellehmkuhl

rafaellehmkuhl commented Oct 6, 2025

Copy link
Copy Markdown
Member Author

Despite implemented, this feature is not working yet, as it needs support for the MAV_CMD_SET_GLOBAL_ORIGIN command on mavlink2rest. @patrickelectric is working on a new version with support for it.

If that's the case, I'm very confused how the DVL extension has supposedly supported it for years...

@Williangalvani is the DVL extension using mavlink2rest to send this message or it is directly injecting in the MAVLink stream?

@ES-Alexander according to William he just used the message and it works.

I took a look at the m2r enum repository and it indeed exists there, which means we just have to update this submodule in the repo. Will do that.

So the repository was already updated. My confusion happened because I was trying to use the new MAV_CMD_SET_GLOBAL_ORIGIN, that replaced the SET_GPS_GLOBAL_ORIGIN some months ago. Since it's a recent deprecation and we still don't have support for the new command in mavlink2rest, I think it's ok to proceed with this deprecated message for now.

@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-setting-global-origin-mavlink-map branch from c215010 to c0b4c2a Compare October 6, 2025 17:09
@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-setting-global-origin-mavlink-map branch from c0b4c2a to 7d0856d Compare October 7, 2025 14:24
@rafaellehmkuhl

Copy link
Copy Markdown
Member Author

@ArturoManzoli rebased to solve the conflicts with current master.

@ES-Alexander

Copy link
Copy Markdown
Contributor

Since it's a recent deprecation and we still don't have support for the new command in mavlink2rest, I think it's ok to proceed with this deprecated message for now.

Would it make sense to try the new one, and fall back to the old one if it fails to send / be accepted?

@ArturoManzoli ArturoManzoli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the 2 items below, everything is working fine

1- The append icons on the inputs are black. Can you set them white?
2- Trying it out with the vehicle offline, Cockpit outputed a snackbar with a generic typescript error. Shouldn't we treat that error to show something like Vehicle offline?

(1)
prepend

(2)
error_setting_global

Opens a dialog for the user to fine tune this position.
@rafaellehmkuhl

rafaellehmkuhl commented Oct 9, 2025

Copy link
Copy Markdown
Member Author

@ArturoManzoli everything fixed!

Github is degraded and not updating the PR though (there should be 4 commits)...

@rafaellehmkuhl rafaellehmkuhl force-pushed the allow-setting-global-origin-mavlink-map branch 2 times, most recently from 7d0856d to 70538a2 Compare October 9, 2025 15:31
@rafaellehmkuhl

Copy link
Copy Markdown
Member Author

@ArturoManzoli Github has now updated the PR.

@rafaellehmkuhl rafaellehmkuhl merged commit 1c2fcf4 into bluerobotics:master Oct 10, 2025
12 checks passed
@rafaellehmkuhl rafaellehmkuhl deleted the allow-setting-global-origin-mavlink-map branch October 10, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-needed Change needs to be documented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow setting GPS(/EKF) origin

3 participants