Saturday, 29 January 2011

Mathematics in robotics

We had a film crew in our Cambridge lab on Wednesday from the Institute of Mathematics. They wanted to film how mathematics is used in programming the robots and applications. I had the dubious pleasure of explaining on camera how I used trigonometry to solve the reverse kinematics but first I had to understand how on Earth I did it in the first place. I had to 'reverse engineer' my own code that I first wrote 25 years ago into mathematical functions and I honestly could not understand my own code for a while. It's said that any code you haven't looked at for more than 6 months might as well have been written by someone else and this was 25 years.

Which brings me to documentation. I read a blog recently in which a programmer argued that documenting your code was less important than explaining the reasons for doing it. Forth and RoboForth are largely self documenting in any case so it's tempting not to add notes. What is more important than documenting what you did is documenting *why* you did it.

The team interviewed myself and Geena (application engineer) and we look forward to seeing the final cut.

No comments:

Post a Comment