gazebosim / gz-gui

Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.
https://gazebosim.org
Apache License 2.0
67 stars 39 forks source link

Add view control reference visual #500

Closed iche033 closed 1 year ago

iche033 commented 1 year ago

Signed-off-by: Ian Chen ichen@osrfoundation.org

šŸŽ‰ New feature

related issue: https://github.com/gazebosim/gz-rendering/issues/265

related PR: https://github.com/gazebosim/gz-sim/pull/1788

Summary

Adds a reference visual to help visualize the anchor point for view control operations.

The implementation is done in gz-gui instead of gz-rendering as it's easier to do since we need to toggle visibility depending on mouse events, and also we don't need to write the same code twice for different view controllers.

By default, the visual is enabled. You can enable / disable this visual with https://github.com/gazebosim/gz-sim/pull/1788.

side note: I tried testing with the orthographic view controller, but the controller seems to be broken

Test it

Launch gazebo and try panning, orbiting, zooming with the mouse and you should see a small yellow ellipsoid rendered at the mouse press position.

ref_visual

Checklist

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.

codecov[bot] commented 1 year ago

Codecov Report

Merging #500 (69e3089) into ign-gui6 (4232d2a) will decrease coverage by 0.51%. The diff coverage is 10.63%.

@@             Coverage Diff              @@
##           ign-gui6     #500      +/-   ##
============================================
- Coverage     68.00%   67.49%   -0.52%     
============================================
  Files            39       39              
  Lines          5239     5286      +47     
============================================
+ Hits           3563     3568       +5     
- Misses         1676     1718      +42     
Impacted Files Coverage Ī”
...interactive_view_control/InteractiveViewControl.cc 15.88% <10.63%> (-2.01%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.