Skip to content

Improve documentation on how to replace Scene3D plugin #1698

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

Merged
merged 9 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Comment on lines +133 to +134
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

@j-rivero j-rivero Sep 13, 2022

Choose a reason for hiding this comment

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

I was unsure about making this change: it would be great since it will get possible bug fixes/udpates on gz-sim7 branch but also could include potential non-wanted changes done to that file or reordering breaking the selection of lines. @jennuine what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, I think it's better to point to a specific commit so that it ensures the ordering is the same


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