Why blender (and it's game engine) is such a great prototyping tool

In my spare time, I do some robotics. Blender has been a great tool in my toolbox that has saved many hours of work. Just for interest, I thought I’d share how I use blender (and it’s game engine) in developing robotics.

Currently I’ve just finished the design of a walking robot.

The first step was figuring out the leg design. This involved a lot of thought, and then a bit of blender to ensure it would work. First off I modelled a single leg, and rigged it using blenders IK to check it gave a suitable range of motion:



Then I assembled it into a full 3D model, showing basic layout of parts as well as making something I can show to other people. It’s not photorealistic, or overly fancy. It’s primary purpose is to make sure that the battery box (underneath) doesn’t hit the legs when they swing, that the chassis will fit the PCB on it.

Next comes a rather more interesting part: Program testing.
Prototyping in BGE is way way faster than prototyping on a robot. I can develop python code twenty times faster than C code.

So first up I need to solve the leg kinematics. I need to make sure that I can tell a leg ‘go to this position relative to the robot body.’ On a simple leg like this, I don’t need an IK solver on the robot - I can solve it all before hand. So enter a couple sheets of paper, and about an hour putting this in the blender game engine, and I can check that my math was correct:

Now this isn’t using blenders rigging. This is using some nasty trigenometry. On the robot, I control the angle of the top link and the short vertical bit. But instead of setting the angles I want to set the tip position (the green bit). To try and debug this is I built the system would be hard. But in python in the game engine? it’s easy.
(You may notice this is only in 2D. Adding in the third direction is trivial - it’s just polar to Cartesian conversion)

Next was to figure out where I want the legs placed. I didn’t want to program in a set gait. I wanted a more dynamic gait, so again, up came the game engine. The .gif was too large, so here’s an image and the blend for you to play with:


Green dots are legs that are moving. Blue dots are legs on the ground and red dots are legs that are stuck. Keys are WSAD for strafing and QE for rotating. Press P to start the game engine.
Blend: Quad Algorithm Test.blend (914 KB)
If you want to have fun, try duplicating the feet. As long as they aren’t rotated and remain parented to the body they’ll get combined into a sensible walk cycle.

So what now? The next step is to built a leg and use serial between the leg IK simulation and and an arduino board to check that my math works in real life. Then I’ll port that code to Arduino. After that I’ll have to build a whole lot more legs and repeat the process with the leg placement algorithm.

Have I done projects like this in the past? Yup, lots of times. Blender is a great tool for prototyping robots.
Here’s a simpler hexapod I did a couple months back (hexapods are the ‘sweet spot’ for legged robots. They are easy to build and control:

I have never come across another package that will allow me to do mechanical design and simulation quite like this. If you ever need to design something, give it a try,

Woah cool!

So blender isn’t just for artists,

I thought all the engineers used ADSK Inventor or something

Super cool! It’s exciting to see Blender used for robotics. I hope I will have time to learn robotic with Blender some day. Thanks for sharing.

Nice to see
I like Blender to for industrial design, one can quickly draw something to test, show, and do some KISS based development.
Without going into time eating complex 3D packages, … and i can even print some 3d Parts, or 3d show models to investors.
Also we can d concept drawings, and show them in animation without revealing the technical parts details etc, in drawing.
To be a bit safe against copycat customers. (those who lurk for ideas, and go to another company to let them build your ideas).