Hi all,
I’m trying to get my legs under me here, and seem to be stuck at step 1. I need to write a graphical simulation of a robotic arm. The kinematics of the robot arm are not known before hand, so building a model of the arm outside the program is not an option here. The most straightforward way to do this is to ingest a kinematic description of the arm and generate, on the fly, a simple scene graph that represents them. In the past, using other graphics engines, I’ve done this with primitive cylinders drawn to represent each link. Since Panda3D doesn’t include primitive graphical objects (?!!) it seems like the way to do this is to generate the a cylinder in a modeling application, export it in a format than can be converted to egg, do the egg conversion, and load the model; then I can attach the right scaling and transformation nodes int he scenegraph to make it represent the various parts of the robotic arm.
I’m finding this to be surprisingly difficult, because I can’t seem to find a format that any of the supplied egg conversion command line utilities can properly ingest, and therefore I can’t even generate a cylinder in an egg file that I can start to play with. To date, I’ve tried the following:
- used existing, know good but fairly old VRML 1.0 models of a robot arm. vrml2egg chokes with the following error:
Error: Nodes of type Switch do not have fields/eventIn/eventOut named whichChoice
- used a simple cylinder that a friend made up for me in Maya. Model exported in VRML 1.0, VRML 2.0, OpenFlight, and Maya binary formats. on the VRML 1.0 model, vrml2egg chokes with the same error as above. On the VRML 2.0 model, vrml2egg returns:
Reading cylinder.x3d
Error in cylinder.x3d at line 1:
<?xml version="1.0" encoding="utf-8"?>
Error in cylinder.x3d at line 1:
<?xml version="1.0" encoding="utf-8"?>
Errors in conversion.
The OpenFlight conversion, flt2egg returns:
Reading Cylinder-Y-OpenFlight.flt
Unable to read: unexpected end of file
The Maya converter does not, in fact, appear to exist in my installation. No maya2egg anywhere on my system.
So… then I decided to try a different modeling program. This one is little-known, but one that I actually know and understand (I’m not, and do not intend to become, a graphical modeling expert): ShapeOnYou, a simple app that nevertheless lets me build simple shapes and exports them in a variety of formats including both VRML 1.0 and VRML 2.0.
vrml2egg chokes on the VRML 2.0 export in identical fashion to that described above. However, it (apparently) works on the VRML 1.0 file, producing an egg file with no errors. Great, right?
But. But but but. The egg file doesn’t actually contain any vertex data. It is filled with descriptions such as the following:
<Group> {
<Group> {
<VertexPool> vpool1 {
}
}
<Group> {
<VertexPool> vpool2 {
}
}
<Group> {
<VertexPool> vpool3 {
}
}
<Group> {
<VertexPool> vpool4 {
}
}
and so on. Not a single numeric vertex description anywhere. Needless to say, the file loads just fine into pview, but nothing gets rendered.
I’m close to the point of giving up. Is there a secret I’m missing here? Is there a file format the the converters actually work with that I can easily access? e.g. not Maya and hopefully not Blender, both of which require far too steep a learning curve for this to be worthwhile for me. Or is there another way to display a simple geometric primitive that I’m missing?