2

I hope you don't mind if I ask for a bit of advice regarding modelling robotic systems. I've recently become rather interested in using inverse kinematics (IK) to control a 5 dof robotic manipulator. I have a solid foundation in IK but what I'm having trouble with is a way to visualize how the manipulator moves with respect to joint angles.

I've looked into using 3D toolkits (such as Blender, Panda3D, vPython) to create a 3d model of the arm, but I'm not sure if I should be looking something with physics support. I'm also not sure how well I can model motion with these packages. Anyone have any suggestions? What I'm NOT looking for is a full blown robotic simulator like Microsoft's Robotic Studio, I'd like to start with the basics and learn how everything works first, ie code the IK in Python, then visualize the motion in 3D. I'm very familiar with Python, so something that interfaces with Python would be preferable.

Thanks!

3 Answers3

2

Well the great thing about Blender is that its API is actually in python!

In addition, it supports inverse kinematics (IK) quite well in addition to many other modeling tools.

Blender Cookie is a great resource.

Here is a tutorial on making IK rigs in Blender.

Blenders python api is documented quite extensively, and it even has an interactive python shell built right in so that you can see the effects of your script as you go along.

The physics engine that blender uses is the popular bullet physics engine, which has been used in many commercial games as well as a few feature films (2012 among them).

Community
  • 1
  • 1
James
  • 641
  • 3
  • 10
  • Thanks for the great resource. Seems like Blender is used quite extensively, which is a definite plus. Will have to try out those tutorials! –  Mar 13 '11 at 06:26
0

This isn't really a hard problem, is it? Presumably you're working out the math on your own; so if your robotic arm is visualized as, say, a few rectangular solids then all you need is something that will render these at the x,y,z coordinates and with the orientation vector you supply, updating when need be. OpenGL should do just fine for this, you could probably do it in <50 lines.

Matt Phillips
  • 9,465
  • 8
  • 44
  • 75
  • You're completely right, it's not an overly difficult problem. But there is an abundance of tools out there, it just finding the best one that has the most flexibility and can be used in this sort of area. I'll have to take a look into OpenGL, I know you can do some neat things with that API. Thanks for the tip. –  Mar 13 '11 at 06:29
0

Python-Ogre is a wrapper around the very mature C++ engine OGRE 3D. I have used it for a pretty significant project and I would give the Python wrapper a mixed but mostly positive review. It's very capable and does a good job of wrapping all C++ functionality in a mostly Pythonic interface. You can get the physics support through one of the many OGRE extension modules which provide those capabilities.

The biggest negative is that the documentation for the Python interface is poor, and you will have to rely on the C++ library's documentation to make sense of some things. To give you a sense of what's possible, I was able to implement a scripting language around OGRE using Python and PyV8 (the language was Javascript), as I prototyped a C++ project.

The resulting prototype was very mature and robust, and I was able to wrap the internals of OGRE with high-level Javascript. With the scripting language I was able to script animation, materials, rendering and physics.

Jesse Dhillon
  • 7,841
  • 1
  • 34
  • 34
  • Thanks for the suggestion, I was completely unaware of OGRE 3D. It's something that I'll to look more into (although I'll admit C++ can be rather daunting). Cheers –  Mar 13 '11 at 06:34