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 plotting to common widget pose #439

Merged
merged 11 commits into from
Aug 6, 2022
Merged

Conversation

AzulRadio
Copy link
Contributor

Signed-off-by: youhy [email protected]

New feature

As mentioned here gazebosim/gz-sim#1571. This PR adds plotting to the common widget pose, then we can forward-port gz-sim citadel (3) to fortress (6) without a recession of features.

Summary

Should be exactly the same as before:

demo_plot

Test it

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: youhy <[email protected]>
@AzulRadio AzulRadio added the OOBE 📦✨ Out-of-box experience label Jul 21, 2022
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Jul 21, 2022
@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #439 (72dbdd6) into ign-gui6 (0fb607b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           ign-gui6     #439   +/-   ##
=========================================
  Coverage     66.76%   66.76%           
=========================================
  Files            39       39           
  Lines          5247     5247           
=========================================
  Hits           3503     3503           
  Misses         1744     1744           

Help us with your feedback. Take ten seconds to tell us how you rate us.

@chapulina chapulina added the enhancement New feature or request label Jul 23, 2022
include/ignition/gui/qml/GzPlot.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPose.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPose.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPlot.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPlot.qml Outdated Show resolved Hide resolved
Copy link
Contributor

@jennuine jennuine left a comment

Choose a reason for hiding this comment

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

There are some issues that need to be worked out.

This is how the plotting worked before:
before

This is after:
after

Currently, it's not able to plot any new data with the same component. For example, if plotting the z for the box and I want to add the z for the sphere nothing happens. I can only drag in a new component but the entity is incorrect (The box entity is 8 and the cylinder entity is 12 but in the legend it's showing 8).

Copy link
Contributor

@jennuine jennuine left a comment

Choose a reason for hiding this comment

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

Nice work on the bug fixes, left some comments. Also, lets rename GzPlot.qml to GzPlotIcon.qml for clarity

include/ignition/gui/qml/GzPlot.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPlot.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPose.qml Outdated Show resolved Hide resolved
Copy link
Contributor

@jennuine jennuine left a comment

Choose a reason for hiding this comment

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

After some investigation, I figured out what mimeData needs to have (see comments). Let's add docs to this to help future developers

include/ignition/gui/qml/GzPose.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPose.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPlot.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPose.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPlot.qml Outdated Show resolved Hide resolved
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

+1 to renaming to GzPlotIcon

include/ignition/gui/qml/GzPose.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzPose.qml Outdated Show resolved Hide resolved
@jennuine
Copy link
Contributor

jennuine commented Aug 5, 2022

Thank you for iterating

4b89afe I updated the optional technique to use Loader.active instead of a placeholder. I also set the default plot enabled to false and some other minor updates. Let me know if you're ok with this

As a quick test for the new optional plotting, you can use this PR gazebosim/gz-sim#1607 and replace this line in Pose3d.qml with:

gzPlotEnabled: {
  return entityType == "model"
}

Then the plotting icons will be hidden for links, etc:
Peek 2022-08-05 14-12

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Works for me!

include/ignition/gui/qml/GzPlotIcon.qml Outdated Show resolved Hide resolved
@AzulRadio AzulRadio merged commit ab7ebe0 into ign-gui6 Aug 6, 2022
@AzulRadio AzulRadio deleted the azulradio/common_widget_pose branch August 6, 2022 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🏯 fortress Ignition Fortress OOBE 📦✨ Out-of-box experience
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants