gz-sim icon indicating copy to clipboard operation
gz-sim copied to clipboard

Unable to load example worlds from main menu.

Open arjo129 opened this issue 2 years ago • 9 comments

Environment

  • OS Version: Ubuntu 22.04
  • Source: 71d965a6f7c5cbac4341002999c09eeaa90e45e2

Description

When trying to load example worlds like the warehouse world from the quickstart menu, I get the error:

[Err] [Server.cc:198] Error Code 1: Msg: Error finding file [/home/arjoc/.gz/fuel/fuel.ignitionrobotics.org/openrobotics/models/warehouse/tip].
[Err] [Server.cc:198] Error Code 1: [/sdf/world[@name="world_demo"]/include[0]/uri:/home/arjoc/.gz/fuel/fuel.gazebosim.org/openrobotics/worlds/tugbot in warehouse/2/tugbot_warehouse.sdf:L176]: Msg: Unable to read file: [/home/arjoc/.gz/fuel/fuel.ignitionrobotics.org/openrobotics/models/warehouse/tip]
[Err] [Server.cc:198] Error Code 9: [/sdf/world[@name="world_demo"]:/home/arjoc/.gz/fuel/fuel.gazebosim.org/openrobotics/worlds/tugbot in warehouse/2/tugbot_warehouse.sdf:L3]: Msg: Error reading element <world>
[Err] [Server.cc:198] Error Code 9: Msg: Error reading element <sdf>
[Err] [Server.cc:198] Error Code 1: Msg: Unable to read file: [/home/arjoc/.gz/fuel/fuel.gazebosim.org/openrobotics/worlds/tugbot in warehouse/2/tugbot_warehouse.sdf]
  • Expected behavior: The example world is loaded
  • Actual behavior:

Steps to reproduce

  1. Run gz sim on a clean install
  2. Open menu. Click on the warehouse world example.

arjo129 avatar Jan 10 '24 08:01 arjo129

I was able to reproduce it on Harmonic.

caguero avatar Jan 22 '24 19:01 caguero

This seems to be caused by having an ignitionrobotics.org uri. It can be reproduced by gz sim -v4 "https://fuel.gazebosim.org/1.0/openrobotics/worlds/tugbot in warehouse" as well without the quickstart menu.

azeey avatar Jan 22 '24 20:01 azeey

Confirmed in Harmonic and Ionic. (Not broken in Garden as I retested just now. Does Harmonic treat those uris differently?) All built from source.

If I replace ignitionrobotics with gazebosim in these 3 files

~/.gz/fuel/fuel.gazebosim.org/openrobotics/worlds/tugbot\ in\ warehouse/2/tugbot_warehouse.sdf
~/.gz/fue//fuel.gazebosim.org/movai/models/pallet_box_mobile/3/model.sdf
~/.gz/fuel/fuel.ignitionrobotics.org/movai/models/pallet/2/model.sdf

and reload the world

gz sim -v4 "https://fuel.gazebosim.org/1.0/openrobotics/worlds/tugbot in warehouse"

Then the world shows up.

To fix this, we need to upload new versions of these 3 models on Fuel, right? The ones under movai org, can we actually update them, or do we need to re-upload the models? The one under openrobotics we can probably update (I don't have permission to upload to that account).

This would need to be done for the other splash screen worlds as well.

Or... actually since it isn't broken in Garden, is the uri treatment something we handle in code? Maybe this?

https://github.com/gazebosim/gz-sim/blob/a267a68b0bee8fb7734f0c50fe452a9bc031423c/src/gui/plugins/resource_spawner/ResourceSpawner.cc#L259-L279

That code is the same in the file in Garden though.

mabelzhang avatar Jan 23 '24 05:01 mabelzhang

Part of me wonders if we should batch run sed on all of these models to remove gazebosim. Or do something in the fuel frontend to give a warning if urls in fuel model point to servers outside of gazebosim.org.

On a side note: If we are displaying models in the splash screen shouldn't we maintain our own fork of them? We definitely should acknowledge that the models come from the community but given that we may make breaking changes between versions this feels like something that can really hurt UX.

arjo129 avatar Jan 23 '24 07:01 arjo129

I thought that's what the code block I linked to above does, it seems to only keep the gazebosim.org and replaces ignitionrobotics.org . I think that's supposed to eliminate the need to fix all the models on Fuel, which there probably isn't an easy way because there are hundreds and they're all owned by different accounts.

(We are having a similar issue in DAVE right now, and I'm between keeping GitHub copies of the models and reuploading. We uploaded to Fuel specifically to make it easier to migrate to new Gazebo, but the models are all owned by different people, and I'd have to download, fix, re-upload to my account, and change all the URIs in the code. Alternatively, if we just keep a local copy on GitHub and forget about Fuel, then I don't have to worry about any of the reuploading and changing URIs.)

mabelzhang avatar Jan 23 '24 17:01 mabelzhang

This was a breaking change we made in Harmonic (https://github.com/gazebosim/gz-harmonic/blob/main/highlights.md#breaking-changes). I thought we updated all the models on Fuel to use gazebosim, so this is surprising. Maybe we didn't handle worlds? cc @nkoenig

azeey avatar Jan 23 '24 17:01 azeey

So, 2 of the models in the warehouse world are not owned by openrobotics, but by movai. (See 3 file paths in https://github.com/gazebosim/gz-sim/issues/2281#issuecomment-1905329824 ) Only openrobotics ones have been updated, right?

1 of them is openrobotics though, and I had to change it locally.

mabelzhang avatar Jan 23 '24 19:01 mabelzhang

Should... we just fix the movai models and reupload them to openrobotics org? Similarly with other broken models in the other splash screen worlds?

mabelzhang avatar Feb 08 '24 08:02 mabelzhang

On a side note: If we are displaying models in the splash screen shouldn't we maintain our own fork of them?

Should... we just fix the movai models and reupload them to openrobotics org? Similarly with other broken models in the other splash screen worlds?

For the short term, I think fixing them and uploading them to openrobotics org with proper credits makes sense. For the longer term, I think we revert parts of https://github.com/gazebosim/gz-fuel-tools/pull/364/ and allow models that include "ignition" to work with a deprecation message.

azeey avatar Feb 12 '24 20:02 azeey

This should be fixed by https://github.com/gazebosim/gz-fuel-tools/pull/406

azeey avatar Mar 18 '24 16:03 azeey