Building One Of The Robo-Ones: Decoding The Motion Files

Image01373
From following the online weblogs posted by many of the builders of Robo-Ones we've noticed that motion creation seems to be a huge stumbling block. People tend to leave it until the last, then rush to create some motions and map them to their remote control. So, we decided to spend some time up front and try to understand what's going on with the motion files and try to come up with a process that will make it easier to create and modify motion sequences.


One approach would be to buy or build a full blown motion emulator - a program that would allow us to run the robot through it's paces totally on the computer screen.

We may eventually pursue that alternative somewhere down the road. But in the beginning we want to develop a gut level feel for the robot, it's servos, how that maps into the motion files, and really understand what's going on. We want to crawl before we walk, so to speak.

Thankfully the Kondo KHR-1 software uses a number of flat format text CSV files. They're easy to pull into an application, edit or modify, and pump out again. Since our favorite CSV compatible application, Microsoft Excel, also comes equipped with Visual Basic programability, it seems like a good place to start. 

First we opened one of the canned routines that are on the KHR-1 CD and are also downloadable from the Kondo Robot website. We happened to pick the routine for fast running, but could have just as easily picked any other routine.

Pulling the file into Excel we were faced with a huge table of numbers that looked like this:


Image01389

Pretty imposing to say the least. Usually when we try to make sense out of a table like this our poor brain just goes into a halt/restart state.

At the moment we're not worried about modifying and reoutputting the table to the robot. That will come later. Right now we just want to make the data more understandable. A little reformatting of the table with Excel started to bring some order into what initially looked like chaos.

Image01390

We grayed out the unused servos, then grouped and labeled the active servos according to their position on the robot and their function. It became easier to immediately distinquish between the upper and lower body, left and right, and to compare similar functions. For example, we could quickly pick out the numbers being sent to the left and right knee servos.

Then we wanted to take a look at the numbers graphically. In this particular robot motion sequence most of the action takes place with the lower legs. Graphing the servo commands for the two legs was as simple as selecting the appropriate columns then using the Excel graph wizard function. We spent a few more minutes cleaning up the graph to make it look pretty and easier to read:

Image01387

From this graph of the servo commands that create the motion sequence, we could start to pick out the repetitive nature of the motions, and the symmetry between pairs of servos. The thought was that it might be possible to just create a part of a motion sequence rather than having to create the whole sequence. If we can successfully create a partial motion sequence for the left leg we might be able to offset and map it to the right leg.

Taking a closer look at the motion sequence:

Image01391

There is definitely a repeating if mirrored or offset pattern taking place. For example, if we look closely at the motion pattern taking place between the left and right knee servos it's easy to detect a pattern.

Lower Body
Left   Right
                     
Hip - in/out Hip - frt/bck Knee Ankle Foot   Hip - in/out Hip - frt/bck Knee Ankle Foot
CH13 CH14 CH15 CH16 CH17 CH18 CH19 CH20 CH21 CH22 CH23
4 -42 -59 19 -4 225 4 2 48 -48 -4
5 -28 -58 32 -6 225 6 50 100 -57 -6
-4 -2 -48 49 4 225 -4 42 59 -19 4
-6 -50 -100 58 6 225 -5 28 58 -32 6
4 -42 -59 19 -4 225 4 3 48 -48 -4
5 -28 -58 32 -6 225 6 50 100 -57 -6
-4 -2 -48 49 4 225 -4 42 59 -19 4
-6 -50 -100 58 6 225 -5 28 58 -32 6
4 -42 -59 19 -4 225 4 3 48 -48 -4
5 -28 -58 32 -6 225 6 50 100 -57 -6
-4 -2 -48 49 4 225 -4 42 59 -19 4
-6 -50 -100 58 6 225 -5 28 58 -32 6
4 -42 -59 19 -4 225 4 3 48 -48 -4
5 -28 -58 32 -6 225 6 50 100 -57 -6
-4 -2 -48 49 4 225 -4 42 59 -19 4
-6 -50 -100 58 6 225 -5 28 58 -32 6
4 -42 -59 19 -4 225 4 3 48 -48 -4
5 -28 -58 32 -6 225 6 50 100 -57 -6
-4 -2 -48 49 4 225 -4 42 59 -19 4

In this particular motion sequence the offset is 2, and the pattern is extremely repeatable and regular. Looking at it graphically:

Image01388

The next step will be to see how the data can be modified and manipulated. For example, the fast running motion sequence is fairly rough and abrupt. Can we expand and smooth it? What if we try putting intermediate steps - say from 1 to 5 - between the existing steps. Can we create the initial intermediate servo positions by interpolation, then adjust them slightly to smooth the motion? Of course the speeds will have to be adjusted as well.

Another avenue to explore - a lot of the robot's motions will be symmetrical. A strike to the right and a strike to the left; turn to the right, turn to the left; kick with the left foot, kick with the right foot; climb a stair with the right foot, do the same with the left; etc. Can we create half the pair, then programmatically generate the other half?

So far, it looks very promising.

You might also enjoy:

  1. Building One Of The Robo-Ones: KHR-1 A Mental Model (Step 1)
  2. Building One Of The ROBO-ONEs: Part 2 (Video)
  3. Building One Of The Robo-Ones: KHR-1 – Learning How To Walk
  4. Building One Of The ROBO-ONEs: Kondo KHR-1
Share and Enjoy:
  • Facebook
  • Twitter
  • Reddit
  • email
  • LinkedIn
  • Slashdot
  • StumbleUpon
  • Google Bookmarks
  • Digg
  • del.icio.us

One comment

  1. This is a great blog. I’m really enjoying these posts about the step by step processes for starting out with a biped. This is a hobby that I’d love to get into as soon as I can save up the money for a biped kit.

Leave a Reply