Write Software

In my mind, simple 'trot' gait, as in previous video is a way of 'cheating'. Robot does nothing smart. No way of being stable, measuring passed distance or being able to lift legs higher to go over different terrain.

So, search for fix for existing gaits continue.

Now, I've decided to 'categorise' gaits and stop calling them 'cat gait' and 'cat2 gait' but give them some proper 'designation'.

First I called 'cat-walk-sp4' and second 'cat-walk-sp6'. First letter 's' in 'sp4' is from 'static', 'p' for 'phase' and 4... well. That's obvious.

  • cat-walk-sp4 - static 4 phases gait
  • cat-walk-sp6 - static 6 phases gait

'Static' is because of pre-calculation of leg placements at the receipt of 'turning distance' (and other parameters like 'stride') and then all that's needed is just to drive legs through those phases (where each phase lasts predefined amount of time). Movement of body in order to 'fix' CoG is equally predefined with other parameters...

And all of it prompted me to try something else: create a gait that would dynamically calculate which leg needs to be lifted and where body needs to be shifted in order to maintain CoG.

One of the gentle example of that was 'stand' gait (not quite a gait) I wrote before: when Flig is asked to stop and 'stand', it would try to deduct the best way to return four legs back to the 'original' (0, 0) positions. It would pick leg which would cause the least instability regarding CoG and then move that leg. If no legs can be lifted without losing stability, it would shift body to the shortest distance to one of four positions (four triangles combination of three legs form) and then shift leg without losing stability. It would repeat that process for each leg. There's some subtleties where it can decide to 'drag' leg on the ground if angle of leg and touching the floor is too steep.

Now, new gait is called:

  • cat-walk-dp4 - dynamic 4 phase gait

I've tried something new - Flig is to find leg that's at the furthest back position and move it to front position. If it can't do it without losing CoG stability then it'll stop moving legs backwards, adjust body and only then attempt to do it. Also, when planning to move a leg forward, it'll calculate positions of all other legs when the moving one is at it destination and prepare body to move/shift that way so CoG is the best for following leg (again calculated at the end conditions) to be lifted.

In order to test all of it - I've created 'gait analyser' which looks like this (for 'cat-walk-sp6':

Gait Analyser - SP6

So, armed with that I did my best in coding complex cases, utilities to calculate centre of inscribed circle of any triangle, distance between two points in relationship of a line (where CoG of Robot and centre of inscribed circle of a triangle represents the line body needs to move and that line crossed one side of the triangle) and such.

For 'cat-walk-dp4' gait analyser looks like this:

Gait Analyser - DP4

Unfortunately, there were some issues. Bugs in software and I felt like I was running out of time and I had to park these and revert back to 'plan-B' gait - a trot gait.

Back To The Drawing Board