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

Set View Camera controller from plugin configuration #506

Closed ahcorde closed 1 year ago

ahcorde commented 1 year ago

Signed-off-by: Alejandro Hernández Cordero ahcorde@gmail.com

🎉 New feature

Summary

Set View Camera controller from plugin configuration

      <!-- 3D scene -->
      <plugin filename="MinimalScene" name="3D View">
        <ignition-gui>
          <title>3D View</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="string" key="state">docked</property>
        </ignition-gui>

        <engine>ogre2</engine>
        <scene>scene</scene>
        <ambient_light>0.4 0.4 0.4</ambient_light>
        <background_color>0.8 0.8 0.8</background_color>
        <camera_pose>-6 0 6 0 0.5 0</camera_pose>
        <camera_clip>
          <near>0.25</near>
          <far>25000</far>
        </camera_clip>
        <view_controller>ortho</view_controller>
      </plugin>

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 #506 (296836f) into ign-gui6 (0e4a198) will increase coverage by 1.25%. The diff coverage is 100.00%.

:exclamation: Current head 296836f differs from pull request most recent head 4ef3676. Consider uploading reports for the commit 4ef3676 to get more accurate results

@@             Coverage Diff              @@
##           ign-gui6     #506      +/-   ##
============================================
+ Coverage     66.85%   68.10%   +1.25%     
============================================
  Files            39       39              
  Lines          5310     5327      +17     
============================================
+ Hits           3550     3628      +78     
+ Misses         1760     1699      -61     
Impacted Files Coverage Δ
src/plugins/minimal_scene/MinimalScene.cc 61.17% <100.00%> (+1.17%) :arrow_up:
...interactive_view_control/InteractiveViewControl.cc 49.48% <0.00%> (+31.44%) :arrow_up:

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

ahcorde commented 1 year ago

@jennuine Added feedback here https://github.com/gazebosim/gz-gui/pull/506/commits/0f7e805fb78a83cf4e04f2e9bafc31a5a9c4c9f7