|
|
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
|
|
|
test version of SRV-1 firmware with new vision, flash and data functions
A new version of firmware is available for testing. It includes most of the extensions proposed in the previous post, with the addition of 2 color management functions.
This code has been tested, but the additions are complex, so there are likely to be some bugs. None of the previous firmware functionality has changed except for a small formatting difference in the "Scan" command (data sent as hex instead of decimal), so this firmware should function fine with the current SRV1Console. If there are any problems, please report them via email to support@surveyor.com or note them on the Surveyor Robotics Forum.
Here are the download links -
Here are the new commands - they look quite complicated, but are actually not too difficult to use. At present, there's no direct support for theses commands in SRV1Console, so you'll have to test them through a terminal / console. There will be additional posts here and on the forum about using these new functions.
| Command | Response | Description
|
|---|
| |
|
|---|
| 'ddxx' | '##dd\n' | set data direction for i/o pins, 1=output, 0=input, xx = [0 0 0 E9 E10 E11 E12 E13]
| | 'dr' | '##drxx\n' | xx = read levels of E9 E10 E11 E12 E13 in this order - [0 0 0 E9 E10 E11 E12 E13]
| | 'dwxx' | '##dw\n' | write output levels for bits on i/o pins, 1=high, 0=low, xx = [0 0 0 E9 E10 E11 E12 E13]
| | | e.g sets E9, E11 and E13 to output - "dd15", set E11 and E13 high - "dw05"
|
|---|
| |
|
|---|
| 'zwxxdddd...' | '##zwxx\n' | write xx bytes to robot flash memory (0xff bytes max), dddd = ASCII data to be written, e.g 'zw10my name is srv-1' writes the 16 byte string 'my name is srv-1' to flash
| | | Note - take care when using this command, as it is possible to overrun the robot's 16-byte FIFO if 'zw' command is issued when robot is not ready to take data
|
|---|
| 'zrxx' | '##zrxxdddd...\n' | read xx bytes from robot flash memory (0xff bytes max), dddd = ASCII data from flash, e.g 'zr10' returns '##zr10my name is srv-1\n'
| | |
|
|---|
| 'vgcx1x2y1y2' | '##vgcy1y2u1u2v1v2\n' | the 'vg' command grabs and samples the range of YUV colors in a rectangular region defined by x1, x2, y1, y2, and save info to color bin #c. there are 16 possible color bins, ranging from 0x0 to 0xF.
e.g. 'vg010200515' will sample colors for color bin #0, ranging from column 16 (0x10) through column 32 (0x20) at heights ranging from line 5 to line 21 (0x15), where line 0 is the lowest line in the image. the robot will return a string with 'vg' followed by the color bin number, then y1=Ymin, y2=Ymax, u1=Umin, u2=Umax, v1=Vmin, v2=Vmax.
as an example, when sampling an area that contained an orange golf ball using the 'vg' command for color bin #0, the robot returned '##vg079B056719AC4\n'. a graphical interface for defining the "region of interest" to be sampled would be especially helpful in using this command.
| | 'vrc' | '##vrcy1y2u1u2v1v2\n' | the 'vr' command retrieves the stored color info from color bin #c.
this command will return string with 'vr' followed by the color bin number, followed by y1=Ymin, y2=Ymax, u1=Umin, u2=Umax, v1=Vmin, v2=Vmax.
in the above example where colors for an orange golf ball were captured using the 'vg' command for color bin #0, issuing a 'vr0' command will return the colors stored in color bin #0 - e.g. '##vr079B056719AC4\n'.
| | 'vccy1y2u1u2v1v2' | '##vcc\n' | the 'vc' command directly sets the contents of color bin #c.
this command will return string with 'vc' followed by the color bin number.
for example, we could save a set of colors to color bin #3 corresponding to measurements taken at another time, such as the above mentioned orange golf ball color measurement, using 'vc379B056719AC4'. we could then confirm that the colors were properly stored by issuing the command 'vr3' to retrieve the contents of color bin #3.
| | 'vsc' | '##vsc010203...\n' | same function as the "Scan" command above for viewing raw "pixel column vector" data , except that we can specify which color bin to use when scanning.
01, 02, 03, etc represents hex value from 0x00-0x40 for each pixel column (80 or 0x50 columns total), so a low value indicates blockage nearby, high value indicates open column (vector). the value is roughly proportional to distance from robot to blockage. note that the "Scan" command is using the colors stored in color bin #0, so issuing the 'S' command or 'vs0' will return the same results, except for the first few characters of the response ('##Scan - ...' vs 'vs0...')
| | 'vbc' | '##vbcx1x2y1y2ssssx1x2y1y2ssss...\n' | the 'vb' command searches for blobs matching the colors in color bin #c, and returns coordinates of an x1, x2, y1, y2 rectangular region containing the matching pixels, along with a count of matching pixels in the blob. up to 16 blobs can be returned, and the blobs are sent in order of pixel count, though blobs smaller than MIN_BLOB_SIZE (currently set to 5 pixels) aren't shown.
an easy way to test this function is to use the 'm' command, which is hardwired to grab color samples from columns 20-59 (0x14-0x3B) in rows 0-5 and store them in color bin #0, then try the 'vb0' command to see what blobs show up. if an object is large enough to cover that hardwired area of the image, you should get pretty good tracking, and can try moving the robot away from the object to see how the blob is tracked.
| | |
|
|---|
Posted Thu, 23 Nov 2006 14:25 |
HTML Link | see additional stories ...
|
|