Page 196 - Anatomy of a Robot
P. 196

07_200256_CH07/Bergren  4/10/03  3:30 PM  Page 181
                                                                     ENERGY CONTROL AND SOFTWARE 181
                            Pipelining (Premission)
                            Just as the robot’s computer can pipeline tasks, so too the robot designers can pipeline
                            tasks well in advance. It’s just a matter of how soon the logical order of execution can
                            be determined. In the case of real-time pipelining, the robot’s computer pipeline is strip-
                            ping out tasks that have been cobbled together at the last moment. The real-time pipeline
                            optimizes tasks that don’t make sense because they could not be predicted beforehand.
                            But with clever programming, the robot’s designers can also optimize ahead of time the
                            ways in which tasks are executed. It’s almost like performing pipelining well before the
                            tasks are to take place, and then feeding the robot’s real-time pipeline a stream of tasks
                            that don’t need any further optimization.
                              Consider a trivial example. Suppose the robot has “shoes” that are required for move-
                            ment. It does not take a genius to realize that putting on shoes should be done before
                            standing up. Those of us with kids, however, know the kid’s already up, in the car, and
                            down to the mall before we discover the surplus of pink wiggly toes. Given that humans
                            are leaps and bounds ahead of robots in their abilities and evolution, we leave it to the
                            reader to discover the advantage this sort of behavior conveys to the human species.
                            Why is the world put together like this? Once we, as humans, become smart enough to
                            discover the reason, we will surely build superior robots.
                              But I digress. The robot designers should be able to plan missions where the robot is
                            controlled well enough to put its shoes on before moving. In fact, with the proper devel-
                            opment software, the premission planners should have the tools that will make proper
                            robot control largely an automatic occurrence.
                              Taking one step back, robot designers should also be able to optimize all the software
                            instructions to conserve power. We’ve already seen the example of the IF instruction
                            optimized for speed or power. Most compilers are capable of optimizing the software
                            for various things. With certain flags set at compile time, a compiler can turn out fast
                            code or condensed code that uses little memory. A good compiler will also eliminate
                            code that will never be executed.



                            SAFEGUARDS

                            The robot’s control software should have control loops that will sense the inordinate
                            consumption of power and other serious situations. This is especially vital in space mis-
                            sions or when the robot cannot be repaired. Two types of events should be watched care-
                            fully with separate software watchdogs:

                                Security breaches Communication coming into the robot should be scanned for
                                 evidence of hackers and other more random interference. If it’s determined that
   191   192   193   194   195   196   197   198   199   200   201