Skip to content

Commit

Permalink
Update instructions after the removal of Scene3D
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
j-rivero committed Sep 12, 2022
1 parent dd5db60 commit 3f2366b
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions garden/sdf_worlds.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,37 @@ Now let's define the GUI. Under the `<gui>` tag we specify anything related to t

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

<engine>ogre2</engine>
<scene>scene</scene>
<ambient_light>1.0 1.0 1.0</ambient_light>
<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>
</plugin>
```

The `GzScene3D` plugin is responsible for displaying the 3D scene of our world. It has the following properties (most of the GUI plugins have them):
The `MinimalScene` plugin is responsible for displaying the 3D scene of our world. It has the following properties (most of the GUI plugins have them):

* `showTitleBar` if true it will show the blue title bar over the plugin with the name mentioned in the `<title>` tag.
* `state` is the state of the plugin it can be docked in its place using `docked` or it can be `floating`.

For the rendering engine we can choose `ogre` or `ogre2`. The `<ambient_light>` and the `<background_color>` specify the ambient and the background color of the scene. `<camera_pose>` specifies the `X Y Z` position of the camera followed by its rotation in `Roll Pitch Yaw`.

#### Common used 3D scene controllers

To provide some minimal functionality and controls, a part of the 3D scene implemented by `MinimalScene`,
a [usual set of plugins](https://github.com/gazebosim/gz-sim/blob/ff1c82b41e548dfdc8076374f9500db2df2c35a1/examples/worlds/minimal_scene.sdf#L29-L128) can be copied from the `gz-sim` repository.

These plugins have the following properties (most of the GUI plugins have them):

* `resizable`: if true the user can change plugin size in the interface
* `height` and `width`: size measures of the plugin
* `state` is the state of the plugin it can be docked in its place using `docked` or it can be `floating`.
* `showTitleBar` if true it will show the blue title bar over the plugin with the name mentioned in the `<title>` tag.

### World control plugin

```xml
Expand Down

0 comments on commit 3f2366b

Please sign in to comment.