Sunday, May 27, 2012
Complexity and robotics, what a concept.
I came across a remarkable quote that sums up my a key feeling about the complexity of robotic design:
"it is not possible to say anything definitive or profound about a complex system without an appropriately complex proof"- David E. Goldberg, The design of innovation
I work in legged locomotion. Too often I have been irked by theoreticians claiming that they have found the perfect "proof" of global stability in a walking system. By global stability, one means that if there is a perturbation to the walking robot, of sufficiently small magnitude, the robot will continue walking unperturbed. Don't get me wrong. This is nice to know, but it is not everything.
Humans do remarkable things related to locomotion. They dance, they run for a touch down dogging opponents who seem to be several times their mass. They walk up stairs, crawl on their stomachs.... Somehow, the balance systems that we have for walking is readily adapted to skiiing, snowboarding and surfing. How weird is that?
My point is that if we are going to build a truly functional humanoid, we will never be able to prove that a robotic system will work. The pursuit of a proof may be a red herring in the design of complex robotic systems.
As I write this, I am also reminded by a quip Michael Arbib once made "it may turn out that the brain is just a big hack." I was horrified when I first heard this (as with many of Prof Arbib's quips, they seem to become more true over time, however).
As I work more and more in the cross disciplinary world of robots and neurocomputation I am beginning to think that more theorem proving is NOT what we need. Rather we need better design tools.
We need to be give a robotic system a high level requirement, and have it find a solution on its own. We can test the solution for competence the same way we test, say, a potential surgeon for competence. How? By an exam in Medicine?
No. Testing begins in kindergarten for human beings. To make it to medical school, you have to prove through years of observation that you are reliable, and consistent, and have some baseline talent. At any stage from k-through medical school to your residency, your careers as a surgeon can be derailed for something as small as not being able to sit still through a lecture...
When you are under the surgeons knife, there is no guarantee that the surgeon won't slice out your liver and eat it. There is no mathematical proof available that proves the surgery will be successful and your liver intact when you leave the hospital.
We infer it. And inference is not proof in physical systems.
Likewise, if we are to build complex robots, we have to get away from the worship of theorem proving. What is the alternative?
We need to think rather: What are a set of competence gates that we can setup to assess if a robot is making progress toward fulfilling our requirements. Second, we need to have a way of automatically trying new variations of robots. I say automatically because today we use the human brain for innovation. However, our minds will always be limited by the models we hold in our heads of the systems we try to control. Inevitably, these models are wrong. We need powerful, automatic (read learning) methods that can innovate automatically.
If we spend more time in developing these tools we will accelerate our progress toward designing truly capable, robotic assistants.
And at the end of the day, I am convinced that it will be, as Prof Arbib remarked, one big hack.
Friday, March 16, 2012
Robbie/I,Robot
I am fascinated by Asimov's Gedankenexperiment in robot design. With pen and paper, and a degree in biochemistry he mapped out interesting territory in the intersection of robotics and humans.
Every sci-fi buff who has been to a movie theatre has had the three laws of robotics drilled into them, whether by watching the charming flick Bicentennial Man or "I, Robot" (or as I think of it, I, Robot, the remix), we know, par coeur.
The Three Law, apart from being well founded, a good idea etc, provide a brilliant dramatic device for Asimov. His robots must follow the three laws, which seem reasonable and good, but when actually applied lead to some tense situation.
Over the last day or so, I have begun to re-read I,Robot. Each time I read it I know more about robotics and each time I read it, I get the chilling feeling that Asimov was some kind of visitor from the future. How could he have figured out so much about robots without ever having built one?
I, Robot, chapter 1: Robbie
The story opens with a little 8 y.o. girl playing hid and go seek with her robot companion. The child is "it" first. She counts to 100 (in my day it was 10, I guess kids were more patient in those day.. !) . The child looks about, and leaves the magic zone of being between robbie and the home tree. Robbie sprints at high speed. Of course, the robot being of superior speed could easily outrun the child to"home base" but, in the last 10 steps it slows down and lets the child win.
From an algorithmic point of view, this feels like Robbie is using a kind of potential field method to trigger his action to run. The Potential Field method, is a motion planning method were objects are represented as repelling objects, and the goal, the home tree in this case, is an attractor. Each object creates a Vector Field.
One way of thinking about of vector field is to stand outside your house with an arrow pointing from the center of your chest. Point the arrow towards your front door. Now have a friend stand near you, say 20 paces away in some direction. Have her use and arrow in the same way. Now image hundreds of friends with such arrows pointing toward home. That is a vector field. The robot needs only follow the arrows to get home.
One way of constructing a vector field is to start with a function of two variables, say x, and y representing the a grid stretched across a local path of earth, and let the center be the goal location in the case of a the vector field associated with the goal and taking the gradient of the function, and putting a minus sign in front of it.
What?
Well, think of a really big bowl, centered at the home location, now if you were standing inside the bowl, the gradient would be the direction you would want to head to get out of the bowl, while the opposite of that (the negative) would lead you to the bottom of the bowl. If all of our friends are standing in the bowl with arrows pointing to the bottom of the bowl, then, you get the idea.
[This is not the only way of creating a vector field and in fact many really useful vector field can exist with are not simple .]
Ok, now the problem with such methods is simply, what function should you start with to give you a vector field.
If we start with a cone the gradient is of constant magnitude (and hence the robot will move at a constant speed). Now, that is not a good thing. If our friend robbie is running at top speed, he would not slow down, but would just smack into the tree.
Hmmm, what about parabola (beautiful example!). Well, when the robot is far away, it would have a gradient approaching infinity. So, this is clearly not possible. But as we got closer, the gradient of the parabola would gradually approach zero.
One idea is to use a cone for distances far away, say, more than ten feet, and then a parabola for distances closer. The effect would be that the robot would move at top speed to the obstacle, then, just before reaching the obstacle would begin to slow down quickly. Just as Asimov described in his book!
Of course, robbie may just have wanted to let the little girl win. Or, did he predict this now well known algorithm for robot path planning?
Dr -T
Every sci-fi buff who has been to a movie theatre has had the three laws of robotics drilled into them, whether by watching the charming flick Bicentennial Man or "I, Robot" (or as I think of it, I, Robot, the remix), we know, par coeur.
The Three Law, apart from being well founded, a good idea etc, provide a brilliant dramatic device for Asimov. His robots must follow the three laws, which seem reasonable and good, but when actually applied lead to some tense situation.
Over the last day or so, I have begun to re-read I,Robot. Each time I read it I know more about robotics and each time I read it, I get the chilling feeling that Asimov was some kind of visitor from the future. How could he have figured out so much about robots without ever having built one?
I, Robot, chapter 1: Robbie
The story opens with a little 8 y.o. girl playing hid and go seek with her robot companion. The child is "it" first. She counts to 100 (in my day it was 10, I guess kids were more patient in those day.. !) . The child looks about, and leaves the magic zone of being between robbie and the home tree. Robbie sprints at high speed. Of course, the robot being of superior speed could easily outrun the child to"home base" but, in the last 10 steps it slows down and lets the child win.
| From Principles of robot motion, H. Choset et al.. |
One way of thinking about of vector field is to stand outside your house with an arrow pointing from the center of your chest. Point the arrow towards your front door. Now have a friend stand near you, say 20 paces away in some direction. Have her use and arrow in the same way. Now image hundreds of friends with such arrows pointing toward home. That is a vector field. The robot needs only follow the arrows to get home.
One way of constructing a vector field is to start with a function of two variables, say x, and y representing the a grid stretched across a local path of earth, and let the center be the goal location in the case of a the vector field associated with the goal and taking the gradient of the function, and putting a minus sign in front of it.
What?
Well, think of a really big bowl, centered at the home location, now if you were standing inside the bowl, the gradient would be the direction you would want to head to get out of the bowl, while the opposite of that (the negative) would lead you to the bottom of the bowl. If all of our friends are standing in the bowl with arrows pointing to the bottom of the bowl, then, you get the idea.
[This is not the only way of creating a vector field and in fact many really useful vector field can exist with are not simple .]
Ok, now the problem with such methods is simply, what function should you start with to give you a vector field.
If we start with a cone the gradient is of constant magnitude (and hence the robot will move at a constant speed). Now, that is not a good thing. If our friend robbie is running at top speed, he would not slow down, but would just smack into the tree.
Hmmm, what about parabola (beautiful example!). Well, when the robot is far away, it would have a gradient approaching infinity. So, this is clearly not possible. But as we got closer, the gradient of the parabola would gradually approach zero.
One idea is to use a cone for distances far away, say, more than ten feet, and then a parabola for distances closer. The effect would be that the robot would move at top speed to the obstacle, then, just before reaching the obstacle would begin to slow down quickly. Just as Asimov described in his book!
Of course, robbie may just have wanted to let the little girl win. Or, did he predict this now well known algorithm for robot path planning?
Dr -T
Thursday, March 15, 2012
Rasberry PI for PI day
The Raspberry Pi is causing quite a stir on the streets. With a built in Graphics Processing unit... which I suspect can be used for video processing... this $25.00 board is capable of 24 GFLOPS.
Microchip has a nice product in the PIC32, but the performance pales in comparison. Futher, the PIC32 development systems cost far more and offer far less in speed performance.
I have not looked at the power per flop usage of the two, but, it is clear that for serious robotics... trying to tap into vision, SLAM, and my favorite- Legged Robots- we need a little more ump than what the PIC32 currently offers.
More critically, the ARM architecture is what Cell phone are made from. It is what students in college want to learn about. However, traditional hands-on microprocessor courses focus on PICs, ATMEL processors with rather anemic processing power.
Student: "Heh Dr. Lewis, are you going to teach us how to build a cell phone?"
Dr. T: "er.. not in this class.. ah... no.."
But now, with this board, we have the guts of a system that could be expanded into a pretty usable almost phone like device. Especially if you go on a shopping spree at SparkFun and check out the cool bits and pieces they have.
While I am a huge fan of microchip, I am frustrated by the fact that it is difficult to run Linux on this processors. The Rasberry has a linux distro, and very importantly comes with nice programming languages. Languages like the language of choice for beginning roboticists: Python.
Python is a very elegant scripting language. (I can't believe I am saying this. On my first encounter with Python, I found it unbelievably frustrating and draconian in its indentation policy)
You type, and you get results instantly. What can be more rewarding! Its like being back in the old days of Lisp. Programming is actually fun and incredibly productive.
With such a huge about of code available. I feel like Trinity in the Matrix in the famous Helicopter scene:
Neo: "can you fly that thing?
Trinity: "not yet, Tank, I need a pilot program for a B 212 helicopter. Hurry!"
Trinity's eye flutter, for a moment then
Trinity: "let's go"
That's pretty much my experience with using python.
Me thinking : "I need a elegant machine learning modules that is easy to use."
On my Mac it is as easy as :
port search learn
I get a bunch of results and then select one promising module:
port install py27-scikits-learn
for my version of python and in minutes I have a naive Bayesian classier running.
Need code to do voice reco on my mac using google voice? Bam! Within 15 minutes world class speech reco is up and running.
Need vision, OpenCv has great python binding.... (Ok, there are a few tricks to building it so that it runs fast... but the standard mac port build is pretty darn good.
So, what does this have to do with the Rasberry?
Here is my vision of the future of Robotic Education:
Rasberry+Mobile Platform+ Camera+Python = Fast Fun and Effective learning.
If you want to dig deeper into the inner working of the platforms, feel free to tear it appart. No worries, its only $25.00!
Yes, yes, there have been Panda boards with ARMs, Beagle Boards, BeagleBone boards, but when you look at the cost of those platforms, it is out of reach for many state schools and high schools.
In my minds eye I see a $50.00 robot kit with awe inspiring processing power, Matrix like programmability doing real, hardcore robotics tasks.
IMHO, this board will take the world by storm.
-Dr T
Microchip has a nice product in the PIC32, but the performance pales in comparison. Futher, the PIC32 development systems cost far more and offer far less in speed performance.
I have not looked at the power per flop usage of the two, but, it is clear that for serious robotics... trying to tap into vision, SLAM, and my favorite- Legged Robots- we need a little more ump than what the PIC32 currently offers.
More critically, the ARM architecture is what Cell phone are made from. It is what students in college want to learn about. However, traditional hands-on microprocessor courses focus on PICs, ATMEL processors with rather anemic processing power.
Student: "Heh Dr. Lewis, are you going to teach us how to build a cell phone?"
Dr. T: "er.. not in this class.. ah... no.."
But now, with this board, we have the guts of a system that could be expanded into a pretty usable almost phone like device. Especially if you go on a shopping spree at SparkFun and check out the cool bits and pieces they have.
While I am a huge fan of microchip, I am frustrated by the fact that it is difficult to run Linux on this processors. The Rasberry has a linux distro, and very importantly comes with nice programming languages. Languages like the language of choice for beginning roboticists: Python.
Python is a very elegant scripting language. (I can't believe I am saying this. On my first encounter with Python, I found it unbelievably frustrating and draconian in its indentation policy)
You type, and you get results instantly. What can be more rewarding! Its like being back in the old days of Lisp. Programming is actually fun and incredibly productive.
With such a huge about of code available. I feel like Trinity in the Matrix in the famous Helicopter scene:
Neo: "can you fly that thing?
Trinity: "not yet, Tank, I need a pilot program for a B 212 helicopter. Hurry!"
Trinity's eye flutter, for a moment then
Trinity: "let's go"
That's pretty much my experience with using python.
Me thinking : "I need a elegant machine learning modules that is easy to use."
On my Mac it is as easy as :
port search learn
I get a bunch of results and then select one promising module:
port install py27-scikits-learn
for my version of python and in minutes I have a naive Bayesian classier running.
Need code to do voice reco on my mac using google voice? Bam! Within 15 minutes world class speech reco is up and running.
Need vision, OpenCv has great python binding.... (Ok, there are a few tricks to building it so that it runs fast... but the standard mac port build is pretty darn good.
So, what does this have to do with the Rasberry?
Here is my vision of the future of Robotic Education:
Rasberry+Mobile Platform+ Camera+Python = Fast Fun and Effective learning.
If you want to dig deeper into the inner working of the platforms, feel free to tear it appart. No worries, its only $25.00!
Yes, yes, there have been Panda boards with ARMs, Beagle Boards, BeagleBone boards, but when you look at the cost of those platforms, it is out of reach for many state schools and high schools.
In my minds eye I see a $50.00 robot kit with awe inspiring processing power, Matrix like programmability doing real, hardcore robotics tasks.
IMHO, this board will take the world by storm.
-Dr T
Subscribe to:
Posts (Atom)