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

World files cannot load models via URI (to fuel.ignitionrobotics.org) #168

Closed
wolfgangschwab opened this issue Apr 5, 2020 · 8 comments · Fixed by #309
Closed

World files cannot load models via URI (to fuel.ignitionrobotics.org) #168

wolfgangschwab opened this issue Apr 5, 2020 · 8 comments · Fixed by #309

Comments

@wolfgangschwab
Copy link

Using a world file that contains URIs to fuel.ignitionrobotics.org generates errors.

I added some code to my local copy of the repository to solve this issue. So, models are automatically loaded from the website. If you are interested in the solution, I can generate a Pull request with this.

@traversaro
Copy link
Member

Hi @wolfgangschwab,
thanks a lot for opening the issue. @diegoferigo can confirm this, but I guess that fuel URIs should be supported, so I think we are indeed interested in fixing this issue, so feel free to provide the details of your solution. Furthermore, I guess it would be useful to know which version of gym-ignition you are using, and if you have a self-contained example that reproduces the issue it would be great too.

@diegoferigo
Copy link
Member

diegoferigo commented Apr 5, 2020

With the released versions of gym-ignition I never tried to load world with models included as Fuel URIs, I would not be surprised if something would not work. However, thinking about how the world model is processed, it should be ignition::gazebo::Server responsibility to download resources from fuel. @wolfgangschwab If you already found a missing piece from our side, I'd be happy to check it.

Spoiler alert: If you didn't notice, we're in the process of a big C++ refactoring #155, and in the refactoring branch I added the possibility to download Fuel models as function calls directly from C++ and Python:

std::string getModelFileFromFuel(const std::string& URI,
const bool useCache = false);

Fuel support is one of many new features that are coming soon. The refactoring branch is not yet usable, but I think it could hit the nightly channel in few weeks.

@wolfgangschwab
Copy link
Author

The major point was, that callback-functions were missing in GazeboWrapper::findAndLoadSdf . So I added

    sdf::setFindCallback(myFetchResource);
    ignition::common::addFindFileURICallback(myFetchResourceUri);

Additionally I had to write the callback-functions and add the ignition fuel-tools package. For world files this works. With robots I still have problems. But currently I'm looking more how laser-sensors (Lidar) can be used. As I understand currently Laser sensors are not implemented. Do you have plans to do so in the near future?

@diegoferigo
Copy link
Member

diegoferigo commented Apr 6, 2020

@wolfgangschwab thanks a lot for the suggestion, I'll have a look!

But currently I'm looking more how laser-sensors (Lidar) can be used. As I understand currently Laser sensors are not implemented. Do you have plans to do so in the near future?

I general, sensors are not yet supported by the framework. In the next months we have other features we need with more urgency, I doubt anyone would start looking into sensors integration in the next few months. If you're interested in contributing, I'd be happy to discuss in a new issue how to implement them.

@wolfgangschwab
Copy link
Author

Thanks, I will open a new issue for the Lidar-Sensors.

Regarding the fix for using URI with fuel: Just tell me, if you would like to get additional info or a Pull request.

@diegoferigo
Copy link
Member

Regarding the fix for using URI with fuel: Just tell me, if you would like to get additional info or a Pull request.

Go ahead with a PR, you can target directly master for this fix. In the meantime, I check if I have to do the same also in the new architecture of the refactoring branch. Thanks a lot!

Thanks, I will open a new issue for the Lidar-Sensors.

Perfect, thanks!

@wolfgangschwab
Copy link
Author

I raised Pull Request #174 to solve this issue.

@diegoferigo
Copy link
Member

Closed via #309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants