// hand off the XML string to the URDF model
var urdfModel = new ROSLIB.UrdfModel({
string : string
});
// Part 2 of making the URDF model, which loads the meshes
var robot = new ROS3D.Urdf({
urdfModel : urdfModel,
path : "magical Github path"
}));
// Now I've got an object called 'robot' that is a superset of THREE.Object3D?
And in order to make the "magical Github path" work, I might have to add some functionality to ROS3D.MeshResource(). A trifle really, that I would have to deal with regardless of whether I was using my URDF loader or yours or Igor's.
But now I've got questions.
a) Where are the joints? It looks like ROSLIB.UrdfModel() loads all the links, but doesn't read in the joints (axis, upper limit, lower limit, etc.) Are you ignoring this because you can rely on the TF tree?
b) Regarding meshes, you don't have an STL loader? I'm looking Urdf.js. That's too bad. I had an experimental one at one point using THREE.STLLoader. I will definitely implement one, because my Darwin OP urdf is in STL, and I have friends who could use a Darwin OP in the browser.. On the bright side, you support textures and materials, which I currently don't.
c) Will the above pseudo-code not work? I'd be skipping the parts of the tutorial where you create a ROSLIB.Ros(), a ROS3D.Viewer(), and a ROSLIB.TFClient(). Are the parts I'm using going to bork if I skip those steps? I'm not asking if you can predict the exact outcome, just if you see reasons why this would fail for sure.
Regarding CORS: Actually, Github is configured for CORS for applications with OAuth access. However, I'm just using JSONP for now, and might add basic authentication eventually to overcome rate limiting. I'm trying to minimize the server-side code so I can host it statically on Github Pages.
Your thoughts?
Will