Skip to content

Comments

BugFix: mission-planning: prevent shared command reference across wayoints#2169

Merged
ArturoManzoli merged 1 commit intobluerobotics:masterfrom
ArturoManzoli:fix-commands-added-on-all-wp-bug
Oct 8, 2025
Merged

BugFix: mission-planning: prevent shared command reference across wayoints#2169
ArturoManzoli merged 1 commit intobluerobotics:masterfrom
ArturoManzoli:fix-commands-added-on-all-wp-bug

Conversation

@ArturoManzoli
Copy link
Contributor

@ArturoManzoli ArturoManzoli commented Oct 8, 2025

Due to a modification made to the base waypoint command in mission planning, a bug was introduced that caused all waypoints to share the same reference within the mission array. As a result, adding a command to the first waypoint would apply the same command to all others in the mission. (1)

(1)

reference_bug.mp4

Comment on lines 539 to 540
const cloneCommands = (cmds?: MissionCommand[]): MissionCommand[] =>
cmds && cmds.length ? cmds.map((c) => ({ ...c })) : makeDefaultNavCommands()
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl Oct 8, 2025

Choose a reason for hiding this comment

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

Can we make a "regular" if/else function out of this one? I think this kind-of-one-liner may be unnecessarily hard to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@ArturoManzoli ArturoManzoli force-pushed the fix-commands-added-on-all-wp-bug branch from 5dc856e to dec97cb Compare October 8, 2025 16:07
@ArturoManzoli ArturoManzoli merged commit 79d5f56 into bluerobotics:master Oct 8, 2025
12 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