Skip to content

Comments

Improve mission data persistence on flight mode#2403

Merged
ArturoManzoli merged 4 commits intobluerobotics:masterfrom
ArturoManzoli:2364-improve-mission-persistence
Feb 12, 2026
Merged

Improve mission data persistence on flight mode#2403
ArturoManzoli merged 4 commits intobluerobotics:masterfrom
ArturoManzoli:2364-improve-mission-persistence

Conversation

@ArturoManzoli
Copy link
Contributor

@ArturoManzoli ArturoManzoli commented Feb 9, 2026

  • Mission data stored in Cockpit is now properly compared with the data on the vehicle;
  • In case of vehicle re-connection or widget reloading, missions will be compared and If they match, the version stored in Cockpit is kept;
  • Removed excessive mission download progress bars that appeared each time the vehicle came back online;
  • The Home waypoint is now automatically restored in Mission Planning if it was previously set by the user;

Close #2364
Close #2365
Close #2163
Close #2143

@ArturoManzoli ArturoManzoli force-pushed the 2364-improve-mission-persistence branch from e149f34 to 5145c40 Compare February 10, 2026 12:42
seq: 0,
frame: { type: MavFrame.MAV_FRAME_GLOBAL_RELATIVE_ALT },
command: { type: MavCmd.MAV_CMD_GET_HOME_POSITION },
command: { type: MavCmd.MAV_CMD_NAV_WAYPOINT },
Copy link
Member

Choose a reason for hiding this comment

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

Was this working at all?

If not, the commit message should mention that as a fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, it wasn't working. I'll reword the commit message

Comment on lines 3242 to 3252
await nextTick()
if (vehicleStore.isVehicleOnline && !home.value && planningMap.value) {
try {
const homeWaypoint = await vehicleStore.fetchHomeWaypoint()
if (homeWaypoint?.coordinates) {
home.value = homeWaypoint.coordinates
}
} catch (error) {
console.error('Failed to fetch home waypoint:', error)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Since both changes (here and line 3263) are doing the same thing, can we make a function and reuse it?

}
}

// There are small differences in the waypoint data between the one downloaded from the vehicle and the stored mission.
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch here!

One question: should this be done in the mission planning view as well? If so, should we store that method in the store for reuse?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mission planning does not handle automatic mission downloads from the vehicle as Map does. The only option is a button that will overwrite what is currently on the planning map.

With that said, I don't think this method will be needed soon on Mission Planning. If we end up needing that, we extract it to the store on demand.

@rafaellehmkuhl
Copy link
Member

Apart from the code comments, the functionality itself appears to be working!

…ET_HOME_POSITION command

Signed-off-by: Arturo Manzoli <[email protected]>
@ArturoManzoli ArturoManzoli force-pushed the 2364-improve-mission-persistence branch from 5145c40 to 69ccb19 Compare February 10, 2026 21:57
@ArturoManzoli ArturoManzoli force-pushed the 2364-improve-mission-persistence branch from 69ccb19 to 5db5e9b Compare February 10, 2026 22:00
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl left a comment

Choose a reason for hiding this comment

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

I have disconnected my vehicle ethernet cable and connected back, and it re-downloaded the mission. Is this the expected behavior?

Also if I switch back and fourth from the mission planning mode, it always re-downloads the mission when the Map widget is opened.

@ArturoManzoli
Copy link
Contributor Author

I have disconnected my vehicle ethernet cable and connected back, and it re-downloaded the mission. Is this the expected behavior?

Also if I switch back and fourth from the mission planning mode, it always re-downloads the mission when the Map widget is opened.

That's weird. Are you sure you have the earliest version of the branch? I've pushed some modifications 18h ago.

Both things you mentioned should be solved.
Does it re download on every re-connection? or only on the first time the vehicle is back online?
Because it has to compare the Cockpit's version with something else, in this case, a downloaded version from the vehicle. But it should download only once per cockpit session and transparently. With no progress bar

@rafaellehmkuhl
Copy link
Member

I have disconnected my vehicle ethernet cable and connected back, and it re-downloaded the mission. Is this the expected behavior?
Also if I switch back and fourth from the mission planning mode, it always re-downloads the mission when the Map widget is opened.

That's weird. Are you sure you have the earliest version of the branch? I've pushed some modifications 18h ago.

Both things you mentioned should be solved. Does it re download on every re-connection? or only on the first time the vehicle is back online? Because it has to compare the Cockpit's version with something else, in this case, a downloaded version from the vehicle. But it should download only once per cockpit session and transparently. With no progress bar

Indeed! I was using the original version of the branch, where the problem still occurred. In the updated version its working flawleslly!

@rafaellehmkuhl rafaellehmkuhl self-requested a review February 11, 2026 21:40
@ArturoManzoli ArturoManzoli merged commit 92e50c2 into bluerobotics:master Feb 12, 2026
11 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

2 participants