-1

I'm working on a web application and I need to load a .world robot file using Three.js. I've tried using the Collada loader but haven't been successful. Can anyone guide me on how to achieve this?

The .world file I'm using is from this https://github.com/leonhartyao/gazebo_models_worlds_collection.

Here's what I've tried so far:

Attempted to use the Collada loader:

var loader = new THREE.ColladaLoader();
loader.load('path/to/your/file.world', function (collada) {
    var scene = collada.scene;
    scene.add(scene);
});

Encountered Issues:

  • The .world file doesn't load properly.

  • I suspect the file format might not be fully compatible with the Collada loader.

Questions:

  • Is there a specific loader in Three.js that supports .world files?

  • Do I need to convert the .world file to another format before loading it with Three.js? If so, what tools or steps should I follow?

  • Are there any examples or documentation that could help me understand how to work with .world files in Three.js?

Any guidance or examples would be greatly appreciated! .

6
  • Welcome to SO! Have you already looked into the threejs documentation? Since .world seems to be a proprietary file format used by the Gazebo application, I suspect the answer to question 2 is "Maybe", followed by "Don't know". EDIT Additionally, I am rather sure that scene.add(scene) will not work.
    – Davi
    Commented Jul 11 at 14:26
  • what did you use for path/to/your/file.world? You do know that this needs to be a URL to an HTTP endpoint and not a file path, right? Commented Jul 12 at 21:46
  • @ChristianFritz yes.I'm currently in the process of loading the file path or URL Commented Jul 15 at 5:24
  • so what now, a file path or a URL? If you use a fie path it won't work. Commented Jul 28 at 20:01
  • @ChristianFritz yes, currently , file path doesn't work . I am still trying to achieve it. Commented Jul 30 at 3:13

0

Browse other questions tagged or ask your own question.