I am working on a research project where we run simulations on openrave. I downloaded collada models from 3dwarehouse sketchup site The dae files were in 1.4.1 format and I am trying to convert them to 1.5.0 (since openrave works with 1.5)
I am using xmllint to validate the dae file with the collada specification (schema.xsd) and this is the output I get
$ xmllint --noout --schema schema.xsd floor15.dae
output.dae:130: element sampler2D: Schemas validity error : Element '{collada 2008 03 COLLADASchema}sampler2D': Character content is not allowed, because the content type is empty.
output.dae:130: element sampler2D: Schemas validity error : Element '{collada 2008 03 COLLADASchema}sampler2D': Element content is not allowed, because the content type is empty.
output.dae fails to validate
From what I understand, the element can have either Character or Element content. If both are not allowed what do I even add here??
Iāve tried going through the specification (collada_spec_1_5.pdf) and fixing the sampler2D node but have had no success.
I tried using this converter (github metaleap go-collada tree master conv-1.4.1-to-1.5) written in Go to convert the original collada file I downloaded from 1.4.1 to 1.5 but that gives me the same errors above.
Google drive link to files:
drive folders 1fHyoXQB5vKJMUv_BgoAZC8Ol-vfiFwV9?usp=sharing
Iāve looked at OpenRave before, looking for test files. It used COLLADA-DOM 2.4. It needs 1.5 for kinematics. Its implementation is very crude, so I wouldnāt worry about validating your files. I wouldnāt expect too much either. (That was some time ago, but I imagine its code is unchanged, especially since nothing else implements kinematics.)
Iāve worked on upgrading COLLADA-DOM significantly, and the person who worked on OpenRave I dealt with some in the beginning:
OpenRave has a robots pack, which is why it has COLLADA in the first place. Itās very peculiar to its implementation of COLLADA. I think it has its own model format, and it is converted from that to its COLLADA format.
I can try to help you around your element if you copy/paste some of the XML code. Or I can look at a file at a regular download link. sampler2D has elements in both versions, so your schema setup may be to blame. But I would not worry about validation. COLLADA is not a mature technology. Iām trying to develop it for noncommercial applications, because it seems like the best place to start, but only because there is no real alternative, and it suits me.
Thanks. Below is the xml for one of the models iām working with.
My main concern is just to get the textures working. The validator helped me point out that there is something wrong with the xml elements. Until then it was all a black box for me.
I am not able to add links. This is the trailing url for a google drive link for all files you might need to replicate this issue: /drive/u/1/folders/1fHyoXQB5vKJMUv_BgoAZC8Ol-vfiFwV9
Youāll have to give me straightforward instructions to access your files.
I donāt see anything wrong around your sampler2D element or its surroundings. I think 1.5 is a little different in this regard. Itās mostly unchanged from 1.4.1, which is actually not a good thing, since there are lot of problems and errors in 1.4.1. There is a list of changes in the manual.
I think your validator is mistaken. Anyway, sampler2D is not an empty content-model element.
EDITED: See if you can post links now. I think your account was suspect as a brand new user account.
Can you double check that your XSD (Scehema) is same as the original one (you can grap that from khronos page)
To convert COLLADA 1.4/1.4.1 to 1.5;
AFAIK, the <image> is different a bit at 1.5
The <surface> doesnāt appears at 1.5
ā¦
Donāt forget that <init_from> has extra element at 1.5 which is <ref>, so this may cause to get wrong image url which will prevent to load texture. This <ref> element does not present at 1.4.
Iām also converting 1.4 to 1.5 and get expected results. I have just migrated the <surface> element into the new <image> element which is very simple to do, I think.
Just try to follow the changes from 1.4 to 1.5, there is a PDF about release notes.
I am still not able to post links. You can replace the ā@ā symbols with ā.ā and the link should work. drive@google@com/drive/u/1/folders/1fHyoXQB5vKJMUv_BgoAZC8Ol-vfiFwV9
I went through the manual but I havenāt been able to figure out what is going wrong in my case. Could it be that the issue with textures is inside openrave and not the dae file?
@recp I got my xsd file from the khronos page itself. I have used the < ref > tag for <init_from>
Would you have an example of the conversion you performed? Might be helpful
Your files work for me, except the UV map has unusual values (38.01813 112.5189 ā¦) so I canāt say if the image is working or not. I donāt get any errors reported from the COLLADA-DOM reference implementation Iām responsible for.
(I deleted an earlier post that had some erroneous findings. Iām hoping making a new post will avoid confusion. The floor_orig file has the JPG in a āfloorā folder.)
Would have a sample of UV map values that I could use? I have no clue what they mean.
Are you able to load it in openrave?
I am aware of the floor folder path. Iāve tried various combinations (placing it in the floor folder, placing it along .dae file, providing full file path, file:// uri) but none worked.
Texture coordinate value space is between 0 and 1 if not wrapping. That doesnāt look like how yours work. Unless that floor is gigantic, and the texture repeats over it hundreds of times. In that case you have to scale down to the size of ant to see your texture. Typical viewing software may not be able to get that close.
EDITED: I donāt use OpenRave. But I think itās for developers right? In which case, debugging it is your best bet.
I gave up on trying to load them in openrave and I am not loading it in gazebo with the 1.4 format dae files. I can see the textures load fine in gazebo but as you said the textures are being repeated over hundreds of times and I need to scale down to view them.
In this case, is changing the scale of the models the only way to fix the texture repetition?
No, the scale is unrelated to texture coordinates. Itās funny. The software that modeled it probably uses pixels instead of 0~1 scale, but in that case the export should have converted it. This isnāt a general help forumā¦ or at least as you can see, there arenāt many people here. I think this forum is more for programmers needing help implementing COLLADA than support for modeling software or even writing COLLADA documents (that is not normally done by hand. I mean, you canāt usually fill out a UV map by hand. You need software. And those software have their own help forums.)
EDITED: I donāt recall seeing any models with textures in OpenRaveās robot pack. Itās possible it doesnāt implement textures. It is is a pretty sketchy library. Takes a lot of work to set up no doubt, and be prepared for tribulations.