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

Add waypoint config panel to mission planning #1523

Merged

Conversation

ArturoManzoli
Copy link
Contributor

@ArturoManzoli ArturoManzoli commented Jan 3, 2025

To be merged after #1469

Adds a starter version of the Waypoint config panel, as part of the "Extend survey to generic MAVLink commands" implementation

Screenshare.-.2025-01-03.9_07_46.AM.mp4

@ArturoManzoli ArturoManzoli marked this pull request as draft January 3, 2025 12:14
@ArturoManzoli ArturoManzoli removed the request for review from rafaellehmkuhl January 3, 2025 12:14
@rafaellehmkuhl
Copy link
Member

rafaellehmkuhl commented Jan 3, 2025

Hey Arturo, could you rebase this branch over master?

As it's based on #1469, you should actually rebase that one over master and them rebase this one over #1469.

@ArturoManzoli ArturoManzoli force-pushed the add-waypoint-config-panel branch from 2d1b57d to ec4184e Compare January 3, 2025 12:25
@ArturoManzoli
Copy link
Contributor Author

Hey Arturo, could you rebase this branch over master?

As it's based on #1469, you should actually rebase that one over master and them rebase this one over #1469.

Yep, I did push the wrong stuff.
Now it has only the diff to be added after merging #1469

@rafaellehmkuhl
Copy link
Member

Hey Arturo, could you rebase this branch over master?
As it's based on #1469, you should actually rebase that one over master and them rebase this one over #1469.

Yep, I did push the wrong stuff. Now it has only the diff to be added after merging #1469

Hey Arturo, could you rebase this branch over master?
As it's based on #1469, you should actually rebase that one over master and them rebase this one over #1469.

Yep, I did push the wrong stuff. Now it has only the diff to be added after merging #1469

Much better! This will be a lot easier to review!

One thing: this seems to be rebased over master, not over the branch of #1469 (I can see that because the changes of #1469 are not here), but we can keep it this way as it will be easier to review, and rebase over master once we merge #1469.

@ArturoManzoli ArturoManzoli force-pushed the add-waypoint-config-panel branch from ec4184e to 89bbdb1 Compare January 20, 2025 18:37
@ArturoManzoli ArturoManzoli marked this pull request as ready for review January 20, 2025 18:42
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.

Initial code review. Didn't test the changes extensively yet.

Comment on lines 1714 to 1720
if (selectedSurveyId.value === '') {
contextMenuType.value = 'map'
showContextMenu(e)
}
if (selectedSurveyId.value !== '') {
showContextMenu(e)
}
Copy link
Member

Choose a reason for hiding this comment

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

This expression can be simplified since showContextMenu(e) will always be called in the end.

emit('removeWaypoint', waypoint)
}

const availableFrames = [
Copy link
Member

Choose a reason for hiding this comment

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

This should be typed using the AltitudeReferenceType enum so we never leave one left.

Comment on lines 13 to 21
><p class="ml-4 text-center text-[13px] font-normal">
{{
selectedWaypoint.id === 'home'
? 'Home'
: `Waypoint ${missionStore.getWaypointNumber(selectedWaypoint?.id as string)}
parameters`
}}
</p></template
>
Copy link
Member

Choose a reason for hiding this comment

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

Those indentations can be better formatted.

Comment on lines 1141 to 1145
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block;">
<circle cx="10" cy="10" r="9" fill="white" stroke="#3B82F6" stroke-width="2"/>
<path d="M10 5V15M5 10H15" stroke="#3B82F6" stroke-width="2"/>
</svg>
`,
Copy link
Member

Choose a reason for hiding this comment

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

No need to reindent.

Comment on lines 1262 to 1394
<div class="survey-vertex-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="5" fill="#3B82F6" stroke="white" stroke-width="2"/>
</svg>
<div class="delete-popup" style="display: none;">
<button class="delete-button">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 4h12M4 4v10a2 2 0 002 2h4a2 2 0 002-2V4M6 4V2h4v2"
stroke="white" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
<div class="survey-vertex-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="5" fill="#3B82F6" stroke="white" stroke-width="2"/>
</svg>
<div class="delete-popup" style="display: none;">
<button class="delete-button">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 4h12M4 4v10a2 2 0 002 2h4a2 2 0 002-2V4M6 4V2h4v2"
stroke="white" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
</div>
</div>
</div>
`,
`,
Copy link
Member

Choose a reason for hiding this comment

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

No need to reindent.

It looks like a lot of leftovers from the mission planning PR were readded here.

@ArturoManzoli ArturoManzoli force-pushed the add-waypoint-config-panel branch 4 times, most recently from 66c7035 to a74bd4d Compare January 24, 2025 00:58
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.

Kapture.2025-01-24.at.14.50.11.mp4

It appears like there's a bug in this side menu.

@rafaellehmkuhl
Copy link
Member

rafaellehmkuhl commented Jan 24, 2025

It seems like this patch is also breaking creation of simple path waypoints:

Kapture.2025-01-24.at.14.52.01.mp4

Edit: the problem happens after you click on a waypoint for the first time.

@ArturoManzoli ArturoManzoli force-pushed the add-waypoint-config-panel branch from a74bd4d to da7eab1 Compare January 27, 2025 12:33
@ArturoManzoli
Copy link
Contributor Author

ArturoManzoli commented Jan 27, 2025

On last patch:

  • Fixed visual bug on side menu;
  • Fixed WP adding bug;
  • Fixed WP coordinate inputs not reflecting on marker, only on lines;
  • Limited coordinates (display only) to 7 significant digits, so its under RTK gps resolution;
  • Modified the mouse cursor to a '+' when inside the add simple path mode;

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'm clicking a waypoint to configure it but it doesn't seem to allow me anymore. It did in the previous version.

image

@ArturoManzoli ArturoManzoli force-pushed the add-waypoint-config-panel branch from da7eab1 to 79e15d6 Compare January 28, 2025 19:20
@ArturoManzoli
Copy link
Contributor Author

I'm clicking a waypoint to configure it but it doesn't seem to allow me anymore. It did in the previous version.

Fixed!
It was related with the 7 decimal places display limit on coordinates.

@ArturoManzoli ArturoManzoli force-pushed the add-waypoint-config-panel branch from 79e15d6 to 1b15fa4 Compare January 28, 2025 20:53
@ArturoManzoli ArturoManzoli requested review from rafaellehmkuhl and removed request for rafaellehmkuhl January 28, 2025 20:57
Signed-off-by: Arturo Manzoli <[email protected]>
@ArturoManzoli ArturoManzoli force-pushed the add-waypoint-config-panel branch from 1b15fa4 to 0a92c96 Compare January 29, 2025 13:25
@ArturoManzoli
Copy link
Contributor Author

@rafaellehmkuhl
On last patch:

  • Fixed WP selection not working outside survey and path creation modes;
  • Updated button text to match 'simple path creation mode' closing;

@ArturoManzoli ArturoManzoli requested review from rafaellehmkuhl and removed request for rafaellehmkuhl January 29, 2025 13:27
@rafaellehmkuhl
Copy link
Member

Working fine now!
Feel free to merge!

@ArturoManzoli ArturoManzoli merged commit 2db8ea0 into bluerobotics:master Jan 29, 2025
11 checks passed
@ES-Alexander ES-Alexander added the docs-needed Change needs to be documented label Jan 29, 2025
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.

None yet

3 participants