Procedures, Rules, And Behaviors

June 23, 2005
A robotic arm used in construction usually has a fixed position and precise movements. Programming the arm is typically a matter of procedure where a fixed set of inputs elicits a fixed set of responses. Mobile robots tend to live in a less structu

A robotic arm used in construction usually has a fixed position and precise movements. Programming the arm is typically a matter of procedure where a fixed set of inputs elicits a fixed set of responses.

Mobile robots tend to live in a less structured and more unforgiving world. It's difficult to predict what combination of variables may be encountered as a robot moves through its environment. Programmers have taken a behavior-based approach to address this problem. Procedural systems like OPRS and rule-based systems are other approaches, but they all tend to differ from the more conventional procedure-oriented programming approaches used by C and Java programmers.

C and Java programmers concentrate on program flow. Procedures explicitly call other procedures. These other approaches can have procedures that operate in a sequential fashion. But they're normally invoked as part of a higher-level process that accounts for the current system state, new inputs from the environment, and a knowledge base.

For instance, in a simple rule-based system, a rule has a set of preconditions. The rule invocation process checks the preconditions against the current system state and invokes rules that meet their preconditions.

Placing system control in the hands of this type of higher-level process has advantages and disadvantages. Unfortunately, new programming tools and techniques are needed, increasing the learning curve as well as requiring new tools. On the plus side, programmers do not have to take care of many of the common functions used by the higher-level process, such as searching a knowledge base and dispatching new rules, behaviors, or whatever the system implements.

Some approaches have tried to use artificial-intelligence languages like Lisp and Prolog, while others try to embed conventional languages such as C and Java. No one solution has dominated, which is why current robotics software platforms are so diverse.

This diversity is easy to understand when you consider the implications of even simple aspects of a dispatch mechanism. For example, it's not unusual to meet the preconditions for more than one rule. What happens when this occurs? In some instances, both rules can be active if they don't use the same resources. In others, a rule has a priority, and the highest-priority rule is used.

These kinds of differences have obvious implications on how a system operates. This is one reason why it can be difficult to move an application from one platform to another. The task is significantly more difficult than moving an application from one operating system to another.

While many behavior-based approaches are found on high-end PCs, this level of hardware isn't required to use the approach. This approach can be taken even on low-end microcontrollers.

The iRobot Roomba runs an 8-bit microcontroller with iRobot's proprietary behavior-based software. Granted, the number of behaviors used in the system is smaller than more complex, multiple robot environments. But it is possible to get quite a bit of flexibility, even with a small number of behaviors.

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!