Archive

Posts Tagged ‘robotics’

Classes for virtual Sensors–Bumpers

January 2, 2011 Leave a comment

As I rework the behavior-based robot framework, I am encountering other areas of code that could also use improvement.  In the case of some of my sensor wrappers, I am not even sure if I ever published them.  I sometimes create virtual sensors when a group of sensors is used for specialized purposes.  The robot programs are more readable and internal logic can be abstracted from the rest of the program making for an easier implementation.

Bumpers – An example of a virtual sensor

I have a tendency to use bumpers on the front of my robots for easy (bump and escape) navigation.  Over the years I have created a couple of code sets that treat the bumper as one sensor even if I use two or more physical sensors to create it.  This article shows why and how I created a class to hide the details of a “Front Bumper” implementation.

Read more…

Fun with Math – Returning plus or minus a Value

April 11, 2010 Leave a comment

Have you ever wanted to add or subtract a number from another at random?  This might come in handy when programming a robot to add randomness to otherwise predictable movement or decision making.  I checked out the web to see what the math world had done to help out.

I found a cool formula:

n = n + 2f(random(1) – 0.5)

Read more…

Finding Objects – A new robot idea for an autonomous robot

July 5, 2009 1 comment

glossy_3d_blue_orbs2_108 I started this blog about a month ago to share ideas and robot programs using behavior-based techniques.  I went back to one of my favorite books, “Robot Programming – A Practical Guide to Behavior-Based Robotics” by Joseph L. Jones to renew my ideas.

Read more…

Collecting my behavior-based RobotC code in one place

July 1, 2009 1 comment

 about-48x48Currently, All code attached to the robot articles and is self-contained (the framework, behaviors, sensor drivers, etc… in one zip file) .  I think this makes the most sense for each robot so people can download all they need in one shot, but I wonder if I should create a pool of code that accumulates the latest versions of the framework and each behavior I created so people can download one or more files as samples to build upon or create their own arrangement.  What do you think?

The tricky part of putting each file online is the framework is being changed as I go, so keeping everything in sync may be a chore.

For instance, this week I made a change to the timer macros that allow a programmer to create and name multiple timers within a behavior.  That means previous code will not function (if you over-wrote the framework file) until you update behaviors to name the timer in the following functions.

CreateTimer(); ---> CreateTimer(timerName);
StartTimer(); ---> StartTimer(timerName);
TimesUp(time); ---> TimesUp (timerName, expirationTime);

AreaRover – Adding Wall Following with the Lego Ultrasonic Sensor

June 25, 2009 3 comments

Building on our behavior-based programming concepts

I thought I better start building more robots to supportTFR_20090624_0340 my articles on behavior-based programming.  The world loves examples and there are very few in this area, if any for the Mindstorms robots.  This robot is a natural progression from the BumperBot.  It is called AreaRover (clever names!).

AreaRover’s job is to bounce around a closed area and cover as much ground as possible in the least amount of time.  In order to accomplish this task, I started with the BumperBot, and added a Lego Ultrasonic sensor on the left side of the robot facing sideways.  I then added a new behavior that triggers if a wall is in range helping the robot to follow walls for a period of time.

Download Program: bbAreaRover.zip
See the Video:

Read more…

Brooks’ Subsumption to the behavior-based framework

June 22, 2009 1 comment

Last week I posted an article that attempted to (in short order) explain my behavior-based implementation for the Lego Mindstorms robotics products. I published a set of RobotC code that can be used as a foundation for programming autonomous robots (NXT or RCX). My plan is to post articles, ideas, discussion, robot designs, etc… in order to create a collaborative pool of information on this topic.

A comment was started about implementing Suppression and Inhibitor nodes into my framework. I love feedback. I went back to my notes and previous research on subsumption architecture.
Read more…

BumperBot – A Detailed Behavior Primer

June 22, 2009 Leave a comment
Bumper Bot

Bumper Bot

Featuring: BumperBot

RobotC Source code for a behavior-based bumper robot:Download: bbBumperBot.zip

Behaviors – Defined

Behaviors are the way to implement functionality in when using the behavior framework. A behavior represents an action or reaction to events (triggers) and resulting request to control where the robot moves.
Read more…

Behavior-based Framework for Mindstorms NXT Robots

June 20, 2009 Leave a comment

Behavior-based Framework for RobotC

Download my RobotC code: : behRobotFramework.zip

I have created a basic framework in RobotC to implement behavior-based programming.  There are two files to start with when creating a behavior robot.

  • behRobotFramework.c – The main robot file (template).
  • behavior_robot.h – the heart of the behavior implemention.
  • Read more…

    What is Behavior-based Programming?

    June 19, 2009 2 comments

    Behavior Robot Programming Basics

    The concept of behavior-based robotics is to supply a set of behaviors that independently work to accomplish their goals, but together allow the robot to accomplish larger tasks. I have created a framework for the Mindstorms NXT robotics system in RobotC that allows a programmer to “plug-in” behaviors, rank them, and create complex tasks. There are a few concepts to grasp before diving in.
    Read more…