My Framework Code

Behavior-based Framework

This following code represents my work in behavior-based robotics to-date.  Start by downloading the framework, and then check out robots of interest.  You will need to build the robot and modify the behaviors to meet your personal requirements, but there should be some good samples you can apply to your own projects.

This framework was written in RobotC for Lego Mindstorms NXT robots.

This code is provided as samples only.  No warranty is implied.  The code provided on this page is used throughout my various autonomous robotic creations.  Check out the blog entries under My Robots If you want to download a complete program that is ready to compile.

Use or abuse the samples below as you see fit, but please provide credit where credit is due.  The research and coding techniques used below represent several years of reading, experimenting, upgrading programming languages, upgrading robots, and designing sensors.  Let me know if you find this information useful.

File Description
RobotC Behavior-Based Framework for Autonomous Robots 2.2 YOU NEED THIS!

Contains robot template file, behavior-based framework header, and CRUISE behavior.  This starter kit gives you the tools to start creating behavior-based programs for your NXT or RCX robot.






29 June 2009

  • changed timer macros to allow for multiple timers at once.  Code in previously
    • CreateTimer()
    • StartTimer()
    • TimesUp()

**Programs must be updated to add the name of the timer

2.1 23 June 2009
  • Added a new method for retrieving if a behavior is requesting control of the robot.
    • BehaviorWantsControl(beh);
2.0 1 June 2009 Initial RobotC release of the behavior-based framework.  Original work was converted from NQC, and Mindscript code from years past.

My Robots

The following is a list of robots from articles published on this site I created using my behavior-based framework to accomplish different tasks.  This is a quick reference to find a robot and its code.

Robot Description



This robot is designed to move around in a closed area.  Its task is to cover as much of the area as possible in the quickest amount of time.  This basic robot introduces several behaviors and techniques for implementing behavior-based programming.

Area Rover Experiments & Code


Collector Robot

Collector robot is a really cool example of behavior-based programming that moves around a closed arena, finding Lego Mindstorms foam pucks, and delivering them to a lighted home base.  It is modeled after the collector robot implemented in BSim from ā€œRobot Programming-A Practical Guide to Behavior-Based Roboticsā€.

Collector Robot Experiments & Code

  1. July 9, 2009 at 11:10 pm

    Thanks for this page. This will make it so much easier for me to get my hands on the latest version, see what’s different from the previous ones, etc.
    I’ve started using subversion (SVN) for all my drivers now, it’s a nice way to keep track of all the changes. TortoiseSVN integrates nicely with the file explorer, so it’s very easy to use.

  1. July 9, 2009 at 9:56 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: