Category Archives: Robotics

A stand for Felix

IMG_0688 IMG_0689

Today I made a stand for Felix. Like the rest of the parts this is designed as a “2 1/2 D” structure. It should be easy for everybody to cut the parts with at laser cutter, a desktop CNC or easily convert the design to something you can print on your 3D printer.
Or, you can just print it, glue it to plywood and cut it with a bandsaw or jigsaw.
I have used plywood and powertools until now, and done some small corrections with a knife and sanding.
Next week I plan to visit our local fablab ( and laser cut my templates on 4mm. acrylic. I’ll be able to test if everything fits “right out of the oven” or if the design needs some adjustments.  I’ll post the final templates as SVG.

Build and test of the new design

Today I finished the new design for the body. I began to use iDraw for this project, and until now it has been a very positive aquaintance. I used to be a competent Illustrator user, but jumped of the Adobe wagon some years ago. iDraw fells very familiar and stay out off my way.

You can download the pattern here: FelixBodyPattern.svg

To test the dimensions and the range of movements, I cut the pieces from 4mm plywood using the pattern as a template, then put it all together using bolts and washers.The servos are fastened with 3mm. bolts and the knee with 2mm. Below you can se af video of the assembly process.

NodeBots & Johnny-Five

I run a bit out of steam while tinkering with the gaits. The write/compile/upload/test cycle on the Arduino took some of the fun out of it.  For the new leg I have to rewrite the IK and control to accommodate the new servo’s setup. So instead of doing this as Arduino sketches, I decided to give NodeBots (  and Johnny-Five ( a try.

This days most of my (professional) projects include NodeJS and Angular, so JavaScript is part of my “mindset”. If a have some spare time during the day I don’t need to “shift-gears” in order to write sketches.

Furthermore Johnny-Five have an Animation module ( that looks like a perfect fit for managing Felix’s walking cycles.

Felix second wind

Lately I have had some time to revisit Felix’s leg design. I wanted to experiment with a simplified version without linkages to increase movement precision. A positive side effect of this, is that by moving half the servos closer to ground I can rely on less powerful servos (HiTEC HS-422).

Another step to increase precision (and repeatability) is to move from an aluminium (hand made) based hardware to laser-cut acrylic. I’ll be posting SVG files of the design as I move along.

I don’t have a Laser Cutter at home, the leg on the picture was made with my scroll-saw to test the geometri and basic movement. Once I’m happy with it, I’ll borrow one at my local Fablab (


Walking – gaits

Now that we can control the position of our feet and move them along a trajectory we can organise the leg movements into a walking gait.
To start with I’ll implement a static gait. In a static gait at any time during the walk cycle there will be at least tree legs in contact with the ground.  Contrast this with dynamics gaits like  trot or pace where two legs at a time are in contact with ground.

A static gait is defined by the order at which the legs are lifted during the walk cycle. In a crawling gait, for example, the legs are lifted in the following order:


  1. front left leg
  2. back right leg
  3. back left leg
  4. front right leg

To implement a static gait we can split our step trajectory: one segment will be the flight phase (the complete arc trajectory) and the ground phase trajectory will be divided into tree segments.

The start of each segment will be represented by a key position. We can the use this key positions to describe our gaits in a compact data structure. A crawling gait can be then represented as:

int[][] gait = {

Each row represents a step. The four numbers in the row represent the key position for the corresponding leg, starting with the back left leg and moving in clockwise direction.
If we take for example the first row (first step in the cycle), the key positions for the four legs are:

back left leg: 1. key position
front left leg: 4. key position
front right leg: 2. key position
back right leg: 3. key position

With this setup we can generate a trajectory for each leg between it’s current key position and the key position in the next step in the cycle. Then we move each leg through the generated trajectory points until we reach the next step and a new trajectory is generated.

You can download the Processing sketch that illustrates this approach from my repository:

In this sketch you will find two different types of static gaits and their corresponding “backwards” versions. Just set the variable “CURRENT_GAIT” to 0,1,2 or 3 to test the different walk cycles.

Walking – trajectory

Once we can control the position of the foot, we can make it follow a trajectory. One cycle through the trajectory is a simple step.

A step has two distinct phases, a ground and a flight phase. During ground phase the leg push the body forward, during the flight phase the foot is lifted and placed ahead of its previous contact point.

The trajectory is constructed as a list of points in space. So we need to generate points along a straight line for our ground phase, and points along an arc for our flight phase.

The number of points in a given path is specified by a “granularity” variable. With cheap servos, there is no need to generate a lot of points. Same goes for implementing any type of “easing“, so we keep it simple and linear.

The geometry of the trajectory can be edited. This is going to be useful when implementing steering. To turn slightly to one side or another, the two legs on one side can take wider steps than the two other legs.

Once again I use processing to test a simple trajectory implementation.
You can download the sketch from the repository (, and play with the step width and height, and the offset of the step in relation to the position of the hip.


I wanted to upload this sketch to jsFiddle as well so you could play with it directly in your browser, but as this sites motto says “in theory there is no difference…”.
I couldn’t get the sketch to work  on the browser as it is and I currently don’t have the time to do the necessary tweaks.
Anyway if you haven’t downloaded Processing yet, is about time.