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

Potential bug in Collada importer #245

Open
caguero opened this issue Sep 7, 2021 · 6 comments
Open

Potential bug in Collada importer #245

caguero opened this issue Sep 7, 2021 · 6 comments
Labels
bug Something isn't working graphics Graphics component help wanted Extra attention is needed

Comments

@caguero
Copy link
Contributor

caguero commented Sep 7, 2021

Environment

  • OS Version: Ubuntu 18.04 and Ubuntu 20.04
  • Source or binary build? Source, compiled from main (e70a75d)

Description

I have two almost exact .dae meshes. One of them loads and the other doesn't with the following error message:

[GUI] [Err] [Ogre2MeshFactory.cc:559] Cannot load mesh with zero sub-meshes
[GUI] [Err] [Ogre2MeshFactory.cc:125] Failed to get Ogre item for [file:///home/caguero/vrx2022_ws/src/vrx/vrx_gazebo/models/placard_2022/meshes/Placard.dae]
[GUI] [Err] [SceneManager.cc:382] Failed to load geometry for visual: visual

placard.zip

See the attached .zip containing two meshes. placard_2022.dae loads but Placard.dae doesn't load. I recommend to run meld to see the differences. The diff shows just a difference in scene id name and <instance_visual_scene url=.

Steps to reproduce

  1. Drag and drop placard_2022.dae into the scene. The mesh should load.
  2. Drag and drop Placard.dae into the scene. The mesh doesn't load.
@caguero caguero added the bug Something isn't working label Sep 7, 2021
@chapulina chapulina added the graphics Graphics component label Sep 7, 2021
@mjcarroll
Copy link
Contributor

Source or binary build? Source, compiled from main (f48085bc5d72b312f4ed0d1721a13565d4f13eb7)

Are you compiling from main or ign-common4? I'm having trouble locating this specific commit on either branch:

git show f48085bc --stat
fatal: ambiguous argument 'f48085bc': unknown revision or path not in the working tree.

@mjcarroll
Copy link
Contributor

I just did a quick test with the ColladaLoader class and the difference seems to be:

 RUN      ] ColladaLoader.LoadPlacard
[       OK ] ColladaLoader.LoadPlacard (0 ms)
[ RUN      ] ColladaLoader.LoadPlacard_2022
[Err] [SystemPaths.cc:467] Could not resolve file [Placard.png]
[Err] [Material.cc:164] Unable to find texture [Placard.png] as a locally cached texture or in path [/home/mjcarroll/workspaces/ign_fortress/src/ign-common/test/data]
[       OK ] ColladaLoader.LoadPlacard_2022 (1 ms)

Is there an image that is missing here?

@caguero
Copy link
Contributor Author

caguero commented Sep 7, 2021

Source or binary build? Source, compiled from main (f48085bc5d72b312f4ed0d1721a13565d4f13eb7)

Are you compiling from main or ign-common4? I'm having trouble locating this specific commit on either branch:

git show f48085bc --stat
fatal: ambiguous argument 'f48085bc': unknown revision or path not in the working tree.

Sorry, wrong commit. The good one is e70a75d . I'm using ign-common4.

@caguero
Copy link
Contributor Author

caguero commented Sep 7, 2021

I just did a quick test with the ColladaLoader class and the difference seems to be:

 RUN      ] ColladaLoader.LoadPlacard
[       OK ] ColladaLoader.LoadPlacard (0 ms)
[ RUN      ] ColladaLoader.LoadPlacard_2022
[Err] [SystemPaths.cc:467] Could not resolve file [Placard.png]
[Err] [Material.cc:164] Unable to find texture [Placard.png] as a locally cached texture or in path [/home/mjcarroll/workspaces/ign_fortress/src/ign-common/test/data]
[       OK ] ColladaLoader.LoadPlacard_2022 (1 ms)

Is there an image that is missing here?

Not sure if it's related because one of the meshes loads but just in case I have included the texture in the zip file.

@mjcarroll
Copy link
Contributor

Added these models as a test here: https://github.com/ignitionrobotics/ign-common/tree/placard_test

Can confirm that it fails:

[ RUN      ] ColladaLoader.LoadPlacard
/home/mjcarroll/workspaces/ign_fortress/src/ign-common/graphics/src/ColladaLoader_TEST.cc:499: Failure
Expected equality of these values:
  6u
    Which is: 6
  mesh->VertexCount()
    Which is: 0
/home/mjcarroll/workspaces/ign_fortress/src/ign-common/graphics/src/ColladaLoader_TEST.cc:500: Failure
Expected equality of these values:
  6u
    Which is: 6
  mesh->NormalCount()
    Which is: 0
/home/mjcarroll/workspaces/ign_fortress/src/ign-common/graphics/src/ColladaLoader_TEST.cc:501: Failure
Expected equality of these values:
  6u
    Which is: 6
  mesh->IndexCount()
    Which is: 0
/home/mjcarroll/workspaces/ign_fortress/src/ign-common/graphics/src/ColladaLoader_TEST.cc:502: Failure
Expected equality of these values:
  6u
    Which is: 6
  mesh->TexCoordCount()
    Which is: 0
/home/mjcarroll/workspaces/ign_fortress/src/ign-common/graphics/src/ColladaLoader_TEST.cc:503: Failure
Expected equality of these values:
  2u
    Which is: 2
  mesh->SubMeshCount()
    Which is: 0
[  FAILED  ] ColladaLoader.LoadPlacard (0 ms)
[ RUN      ] ColladaLoader.LoadPlacard_2022
[       OK ] ColladaLoader.LoadPlacard_2022 (1 ms)

And the diff is as you say:

9c9
<     <created>2021-08-31T22:23:17Z</created>
---
>     <created>2021-08-31T21:25:29Z</created>
11c11
<     <modified>2021-08-31T22:23:17Z</modified>
---
>     <modified>2021-08-31T21:25:29Z</modified>
577c577
<     <visual_scene id="placard_2022" name="placard_2022">
---
>     <visual_scene id="Placard" name="Placard">
605c605
<     <instance_visual_scene url="#placard_2022"/>
---
>     <instance_visual_scene url="#Placard"/>

@chapulina chapulina added the help wanted Extra attention is needed label Oct 4, 2021
@caguero caguero changed the title Potential bug in Collada exporter Potential bug in Collada importer Oct 25, 2021
@fmrico
Copy link

fmrico commented Oct 6, 2024

Hi,

I can confirm the problem persists in Gazebo Sim, version 8.6.0 (binary package for Jazzy)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working graphics Graphics component help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants