Author Topic: LittleRobot (tm) Algorithms  (Read 1118 times)

prof_braino

  • Newbie
  • *
  • Posts: 30
    • View Profile
LittleRobot (tm) Algorithms
« on: February 13, 2013, 09:34:20 AM »
We think we can make certain algorithms fairly easily.  These are very simple functions, that can be strung together into complex seeming behaviors.  If you don't want to use forth, you can try the same thing in you favorite language.  One goal is to be able to present the same function is each language, for comparison.

The simple functions are the drivers.   
* LED - turn on, turn off (if the line is not being used by other equipment)
* touch button  - detect touch  (if the line is not being used by other equipment)
* ultrasonic sensor - read distance
* motor - set acceleration, set speed, rotate, stop, reverse, freewheel, brake (freewheel might not do anything on these)

From the above we can (maybe) get really fancy looking functions (maybe)
* scan:  detect the immediate environment
   - pivot 180 degrees right, pivot 360 degrees left, pivot 180 right, taking readings at various points
   - pivot determine if there is an obstacle, a clear path, or an unbounded space for each reading point
* move to next position - based on "scan"  move to the next space close to something, without hitting an obstacle
* MAP : create a crude map of the environment.  this will be simply counting wheel rotations to start with (This is easy since we are using stepper motors, we just count steps)
* Navigate perimeter : using MAP, navigate around a room until bot returns to the starting position.
* Explore : travel all paths in the area bounded by Navigate until no path smaller than bot width is available.

I'm thinking maybe we can get something REALLY fancy looking, yet simple.  If we have a class of several bots, we might be able to get them to appear to "swarm":
* Run away - if an object is getting closer (approching faster then bot's speed) move to avoid the object
* follow - if an object is getting farther away (faster than bot speed) move to follow or maintain distance to object
If this can be implemented, the bots might appear to "swarm"

prof_braino

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: LittleRobot (tm) Algorithms
« Reply #1 on: February 14, 2013, 10:06:21 AM »
One thing about multiple bopts in the same room:

so far, all the bots have the same ultrsonic sensor, operating at the same frequency.

This means that when one talks, it may create interference for other units. 

Might need to work out a scheme where the bots can "wait their turn" or something.....

Oldbitcollector

  • Holy Smoke!
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Projects, Not Platforms
    • View Profile
    • Propellerpowered
Re: LittleRobot (tm) Algorithms
« Reply #2 on: February 14, 2013, 07:25:08 PM »
Another issue I've started looking at is multiple Bluetooth modules in the same room.

Jeff

Oldbitcollector

  • Holy Smoke!
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Projects, Not Platforms
    • View Profile
    • Propellerpowered
Re: LittleRobot (tm) Algorithms
« Reply #3 on: February 17, 2013, 05:41:48 PM »
Solved!  You can easily change the connected module from a terminal on the PC.

http://propellerpowered.com/forum/index.php?topic=386.0

prof_braino

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: LittleRobot (tm) Algorithms
« Reply #4 on: February 19, 2013, 10:48:17 PM »
One reason Sal choose the bluetooth modules is the unique ID's.  Having 27 COM ports defined is "somewhat confusing" as he puts it.  So He has each test station with a descriptive name, and connects to whichever he wants, from anywhere in the labs.   There is a limit to how many bluetooth devices one can access, but Sal hasn't gone that far yet.

The propforth mechanism  is set by editing and loading a one time configuration script, it takes under 30 seconds.

I do believe we could have a room full of kids, each with their own terminal and bot, and not have any bluetooth communication problems.  We'll see when the session starts.

Oldbitcollector

  • Holy Smoke!
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Projects, Not Platforms
    • View Profile
    • Propellerpowered
Re: LittleRobot (tm) Algorithms
« Reply #5 on: February 19, 2013, 10:50:30 PM »
We're working this from two directions..  Success is insured!

Jeff