We don’t allow questions seeking recommendations for books, tool开发者_JAVA百科s, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionA short while I asked for suggestions on choosing a Python-compatible 3D graphics library for robotic motion modelling (using inverse kinematics in Python). After doing a bit of research and redefining my objectives I hope I can ask once again for a bit of assistance.
At the time I thought Blender was the best option - but now I'm having doubts. One key objective I have is the ability integrate the model into a custom GUI (wxPython). Seems like this might be rather difficult (and I'm unsure of the performance requirements).
I think I'm now leaning more towards OpenGL (PyOpenGL + wxglcanvas), but I'm still struggling to to determine if it's the right tool for the job. I'm more of a CAD person, so I have trouble envisioning how to draw complex objects in the API and create motion. I read I could design the object in, say Blender, then import it into OpenGL somehow, but I'm unsure of the process? And how difficult is manipulating motion of objects? For example, if I create a joint between two links, and I move one link, would the other link move dynamically according to the first, or would I need to program each link's movement independently?
Have I missed any obvious tools? I'm not looking for complete robotic modelling packages, I would like to start from scratch so I can incorporate it into my own program. For for learning more than anything. So far I've already looked into vPython, Pyglet, Panda3D, Ogre, and several professional CAD packages.
Thanks
There is a similar project going on that implements a robotic toolbox for matlab and python, it has "Rudimentary 3D graphics", but you can always interface it with blender with a well knit script, it will be less work than reinventing the wheel
If movements can be pre-computed, you can use Blender, hand-craft animations, bake them in some animated file format (cal3d ?), and just render in your wxPython OpenGL window.
If you need to handle user input, you can use a physics engine... I hear Bullet has Python bindings : http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?p=&f=9&t=4030 (probably still unstable).
Regarding your doubts on Blender/OpenGL : What do you mean by "complex objects" ? How many "robots/whatever" ? How many triangle per robot ? How many articulations per robot ? (I'll edit my answer depending on yours)
Anyway, OpenGL in itself won't do anything else that juste "display triangles" ; everything else has to be done eslewhere.
EDIT
Sorry for the delay, I completely forgot.
So here is what I suggest :
- Model your robot in Blender with polygons. You can easily go at >10k polygons, but try to keep the number of objects small (1 object per moving part)
- Rig it, i.e. create a skeleton for it. You don't need to animate it.
- Export as Collada or X3D
- In your own OpenGL app, reimport
- Draw your objects at the positions and orientations specified by the skeleton
- Modify the angles between the bones just as you would do with real stepper motors
- If step #5 was done right, robot should be follow the movements
- Optionally add physics ( for instance with Bullet ). The API will be similar in concept to OpenGL, and you will be able to catch objects with your robotic arm.
good luck !
精彩评论