Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

Collada fails to find texture with space in file name #2369

Open
osrf-migration opened this issue Oct 27, 2017 · 1 comment
Open

Collada fails to find texture with space in file name #2369

osrf-migration opened this issue Oct 27, 2017 · 1 comment
Assignees
Labels
7 Gazebo 7 bug Something isn't working minor

Comments

@osrf-migration
Copy link

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

The original report had attachments: space_in_texture_filename.tar.gz


In gazebo 7 on ubuntu xenial a model with a collada mesh will not show a texture if it has a space in the filename. (Model attached)

The following lines appear running gazebo verbose.

[Err] [Material.cc:100] Unable to find texture[Material%20Ambient.png] in path[/other/dir/textured_mesh/meshes]
[Err] [SystemPaths.cc:410] File or path does not exist["/other/dir/textured_mesh/meshes/../materials/textures/Material%20Ambient.png"]
[Err] [RenderEngine.cc:483] URI doesn't exist[/other/dir/textured_mesh/meshes/../materials/textures/Material%20Ambient.png]
[Err] [Material.cc:100] Unable to find texture[Material%20Ambient.png] in path[/other/dir/textured_mesh/meshes]

It looks like the loader did not convert the %20 to a space. If I change it to an underscore the texture is correctly applied. The filename of a texture in a collada file is specified using the tag <init_from> which has the type xs:anyURI which requires characters like spaces escaped with a %. The code responsible for fetching a material will need to un-escape the filename before searching for it.

@chapulina
Copy link
Contributor

On Gazebo 11.2.0, the model that is linked to this issue fails to load the texture with:

[Wrn] [ColladaLoader.cc:1435] ambient texture not supported

I changed the ambient texture to diffuse and now it fails like the original issue:

[Wrn] [SystemPaths.cc:459] File or path does not exist [""] [Material%20Ambient.png]
[Err] [Material.cc:91] Unable to find texture[Material%20Ambient.png] in path[/home/louise/.gazebo/models/textured_mesh/meshes]
[Wrn] [SystemPaths.cc:459] File or path does not exist [""] [Material%20Ambient.png]
[Err] [Material.cc:91] Unable to find texture[Material%20Ambient.png] in path[/home/louise/.gazebo/models/textured_mesh/meshes]

The new model is here: https://app.ignitionrobotics.org/chapulina/fuel/models/Textured%20mesh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
7 Gazebo 7 bug Something isn't working minor
Projects
None yet
Development

No branches or pull requests

2 participants