Skip to content
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

Unable to load example worlds from main menu. #2281

Closed
arjo129 opened this issue Jan 10, 2024 · 10 comments · Fixed by gazebosim/gz-fuel-tools#406
Closed

Unable to load example worlds from main menu. #2281

arjo129 opened this issue Jan 10, 2024 · 10 comments · Fixed by gazebosim/gz-fuel-tools#406
Assignees
Labels
bug Something isn't working

Comments

@arjo129
Copy link
Contributor

arjo129 commented Jan 10, 2024

Environment

  • OS Version: Ubuntu 22.04
  • Source: 71d965a

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 arjo129 added the bug Something isn't working label Jan 10, 2024
@azeey azeey moved this from Inbox to In progress in Core development Jan 22, 2024
@caguero
Copy link
Contributor

caguero commented Jan 22, 2024

I was able to reproduce it on Harmonic.

@azeey
Copy link
Contributor

azeey commented Jan 22, 2024

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.

@mabelzhang
Copy link
Contributor

mabelzhang commented Jan 23, 2024

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?

// Since the ign->gz rename, `servers` here returns two items for the
// canonical Fuel server: fuel.ignitionrobotics.org and fuel.gazebosim.org.
// For the purposes of the ResourceSpawner, these will be treated as the same
// and we will remove the ignitionrobotics server here.
auto urlIs = [](const std::string &_url)
{
return [_url](const fuel_tools::ServerConfig &_server)
{ return _server.Url().Str() == _url; };
};
auto ignIt = std::find_if(servers.begin(), servers.end(),
urlIs("https://fuel.ignitionrobotics.org"));
if (ignIt != servers.end())
{
auto gzsimIt = std::find_if(servers.begin(), servers.end(),
urlIs("https://fuel.gazebosim.org"));
if (gzsimIt != servers.end())
{
servers.erase(ignIt);
}
}

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

@arjo129
Copy link
Contributor Author

arjo129 commented Jan 23, 2024

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.

@mabelzhang
Copy link
Contributor

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.)

@azeey
Copy link
Contributor

azeey commented Jan 23, 2024

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

@mabelzhang
Copy link
Contributor

mabelzhang commented Jan 23, 2024

So, 2 of the models in the warehouse world are not owned by openrobotics, but by movai. (See 3 file paths in #2281 (comment) ) Only openrobotics ones have been updated, right?

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

@mabelzhang
Copy link
Contributor

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

@azeey
Copy link
Contributor

azeey commented Feb 12, 2024

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 gazebosim/gz-fuel-tools#364 and allow models that include "ignition" to work with a deprecation message.

@azeey
Copy link
Contributor

azeey commented Mar 18, 2024

This should be fixed by gazebosim/gz-fuel-tools#406

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
4 participants