Home > Behavior-based Theory, RobotC Code > Behavior-Based Robot Framework 3.0

Behavior-Based Robot Framework 3.0

I released a new version of my behavior-based robot framework today.  It includes inhibit and enable functionality.  Let me know what you think.

Download it here: Behavior-Based Robot Framework 3.0

I included a sample robot that extends the basic CRUISE robot by adding a new behavior SPIN that periodically inhibits CRUISE and takes control. 

The behavior diagram is shown below.



CRUISE has priority in this configuration.  CRUISE ALWAYS requests control, and moves the robot forward.

SPIN has a lower priority.  Although is always requests control to spin the robot, it would normally be unable to gain control of the robot because CRUISE always gets control.

SPIN is wired to CRUISE and inhibits CRUISE from functioning.  In the sample code, SPIN inhibits CRUISE every 2s.  When inhibited, the Arbitrator ignores the request for control, and allows SPIN to gain control.

At the end of each cycle through the arbitrator, behavior inhibition is reset.  Any behavior wanting to inhibit another behavior, but continue to do so in a stateless fashion.

Possible future work on the inhibit functionality:

  • Add timing to the inhibition such that a behavior may inhibit another behavior for ntimeslices.

Other Changes

Here is a list of other changes to version 3.0 of my framework…  Happy programming.

* \version 3.0 – TFR 10 April 2010
* Moved generic functions/macros to a utility.h file for more generic use.
* Robot drive changes.
  * Changed speed and steering to motorParm1, 2 for generic driving
  * Moved the actual robot drive functions out of the behavior file to
    make them more generic.
      * Other programs can use the drive routines outside the framework
      * Different drive types can be used with the framework using the 2 parms
        * differential drive (tank drive – control each motor separately)
        * my differential drive (r/l motors linked using speed/steering)
        * drive/steer (car-like – one motor drives, one steers)
* Added suppression/inhibit logic to behaviors
  * Inhibit attribute
  * Inhibit/Release methods added to control inhibition
  * Arby changed to release inhibition after each cycle
* Sorry – several behavior names changed to be more specific
* Internal behaivor method arguments changed so that a specific behavior
  is passed by reference to abstract the behavior methods.

  1. April 12, 2010 at 5:35 am


    Thanks for implementing this new functionality. I look forward to tinkering with it!

    – Xander

  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: