Skip to content

Commit

Permalink
Improve documentation on how to replace Scene3D plugin (#1698)
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored Aug 21, 2023
1 parent 3432dcb commit 1e2a832
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
37 changes: 22 additions & 15 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ message's header.
* CMake `-config` files
* Paths that depend on the project name

* The `Scene3D` plugin has been removed and replaced with `gz-gui`'s `MinimalScene` plugin. See
this same document for the instructions to replace it when it was deprecated 5.x to 6.x.
Setting `<legacy>false</legacy>` is no longer required for `TransformControl` and
`ViewAndle` plugins.

* Python library imports such `import ignition.gazebo` and `from ignition import
gazebo` should be replaced with `import gz.sim7` and `from gz import sim7`.
Note the change from `ignition` to `gz` and the addition of the major version
Expand All @@ -59,7 +64,6 @@ message's header.
+ In the Hydrodynamics plugin, inverted the added mass contribution to make it
act in the correct direction.


## Gazebo Sim 6.11.X to 6.12.X

* **Modified**:
Expand Down Expand Up @@ -116,20 +120,23 @@ since pose information is being logged in the `changed_state` topic.
* The `GzScene3D` GUI plugin is being deprecated in favor of `MinimalScene`. In
order to get the same functionality as `GzScene3D`, users need to add the
following plugins:
+ `MinimalScene`: base rendering functionality
+ `GzSceneManager`: adds / removes / moves entities in the scene
+ `EntityContextMenuPlugin`: right-click menu
+ `InteractiveViewControl`: orbit controls
+ `CameraTracking`: Move to, follow, set camera pose
+ `MarkerManager`: Enables the use of markers
+ `SelectEntities`: Select entities clicking on the scene
+ `Spawn`: Functionality to spawn entities into the scene via GUI
+ `VisualizationCapabilities`: View collisions, inertial, CoM, joints, etc.

Moreover, legacy mode needs to be turned off for the following plugins
for them to work with `MinimalScene` (set `<legacy>false</legacy>`):
+ `TransformControl`: Translate and rotate
+ `ViewAndle`: Move camera to preset angles
+ `MinimalScene`: base rendering functionality
+ `GzSceneManager`: adds / removes / moves entities in the scene
+ `EntityContextMenuPlugin`: right-click menu
+ `InteractiveViewControl`: orbit controls
+ `CameraTracking`: Move to, follow, set camera pose
+ `MarkerManager`: Enables the use of markers
+ `SelectEntities`: Select entities clicking on the scene
+ `Spawn`: Functionality to spawn entities into the scene via GUI
+ `VisualizationCapabilities`: View collisions, inertial, CoM, joints, etc.

SDF code for all these can be found in:
https://github.com/gazebosim/gz-sim/blob/ff1c82b41e548dfdc8076374f9500db2df2c35a1/examples/worlds/minimal_scene.sdf#L29-L128

Moreover, legacy mode needs to be turned off for the following plugins
for them to work with `MinimalScene` (set `<legacy>false</legacy>`):
+ `TransformControl`: Translate and rotate
+ `ViewAndle`: Move camera to preset angles

* The `gui.config` and `server.config` files are now located in a versioned
folder inside `$HOME/.gz/sim`, i.e. `$HOME/.gz/sim/6/gui.config`.
Expand Down
6 changes: 4 additions & 2 deletions src/gui/Gui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,10 @@ std::unique_ptr<gz::gui::Application> createGui(
"VisualizationCapabilities"};

std::string msg{
"The [GzScene3D] GUI plugin has been removed since Garden. "
"Loading the following plugins instead:\n"};
"The [GzScene3D] GUI plugin has been removed since Garden.\n"
"SDF code to replace GzScene3D is available at "
"https://github.com/gazebosim/gz-sim/blob/gz-sim7/Migration.md\n"
"Loading the following plugins instead:\n"};

for (auto extra : extras)
{
Expand Down

0 comments on commit 1e2a832

Please sign in to comment.