Surveyor Robotics Journal
   



email:
support@surveyor.com

web:
Surveyor Corporation

rss:
Subscribe

Archives
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
Februray 2006
January 2006

       
Fri, 01 Dec 2006

using the image processing extensions in SRV-1 BASIC (113006 firmware)

As a result of code testing, a few small SRV_protocol changes have been made. In the BASIC interpreter, a COMMENT command was added, PRINTX was removed, and BITDIR / BITSET / BITGET were activated. For the moment, we haven't activated the INPUT command, thinking instead that we might add some kind of non-blocking read to check for incoming data, but haven't yet decided on the best approach.

In the core robot functions, two commands were added to manage flash memory - 'zs' to set the current flash sector number (default is 00) and 'zg' to get the current flash sector number. At the moment, the code only allows access to flash sector #00, but this limit will eventually be lifted.

Here's an example of how to use some of the image functions in SRV-1 BASIC to create a very primitive version of "wander mode":

COLORCAP 1 25 55 1 8
100 IMGCAP
SCAN 1
PRINT X,Y,Z
IF X < Z THEN MOTORS 75 25
IF Z < X THEN MOTORS 25 75
IF X = Z THEN MOTORS 50 50
IF X + Z = 0 THEN MOTORS 0 0
GOTO 100
END

This code takes an initial color sample of nearby pixels (columns 25-55, rows 1-8), and stores the sample in color bin #1. It then looks at the left ('X') and right ('Z') Scan sectors (in BASIC SCAN, there are only 3 regions, not 80), turning one way or the other if one region seems more open. A useful extension to this code would be to also look at the center ('Y') region, and spin 45-degrees if all 3 regions were blocked, but I wanted to keep this simple.

Here are the latest download links -

Posted Fri, 01 Dec 2006 14:25 | HTML Link | see additional stories ...