gazebosim / sdformat

Simulation Description Format (SDFormat) parser and description files.
http://sdformat.org
Apache License 2.0
167 stars 95 forks source link

Support Data URI for meshes/materials #155

Open osrf-migration opened 7 years ago

osrf-migration commented 7 years ago

Original report (archived issue) by Shane Loretz (Bitbucket: Shane Loretz, GitHub: sloretz).


Currently meshes and materials can be referred to using a uri like model://my_model/meshes/mymesh.stl. If the <uri> tag supported data uri The mesh or model could be base64 encoded and made part of the model or world file.

This would enable describing a world with just a single .world file. All the resources would be part of the world file.

ruffsl commented 1 year ago

Currently meshes and materials can be referred to using a uri like model://my_model/meshes/mymesh.stl.

@sloretz, for future reference, where exactly is this specified in the spec? I'd like to what URI schemas are currently supported.

nkoenig commented 1 year ago

Please don't use the model:// format. It will be going away since it's ill defined and can have multiple meanings depending on the environment.

The preferred schemas are https:// and file://. Where https:// can point to a Fuel resource, and file:// can point to a file/directory on disk,

ruffsl commented 1 year ago

Oh, ok. I was trying to use gzweb classic with some models included in the aws-robomaker-small-warehouse-world package:

It will be going away since it's ill defined and can have multiple meanings depending on the environment.

You may want to notify the turtlebot maintainers, as their SFD files are a common template for ROS users, but as of writing they are still all using the model:// format for most of their simulation package models.

The fact that the turtlebot's SDF files were working, where aws SDF files weren't, was what clued me in on why gzweb classic was reporting 404 errors for aws mesh assets. If you have an alternate workaround for the above PR, I'd be happy to try it.