Surveyor Robotics Journal
   



email: support@surveyor.com

SRV-1 home page

Surveyor Corporation home page

Subscribe to a syndicated RSS feed.

Subscribe with Bloglines

Archives
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

       
Wed, 27 Dec 2006

test version of SRV-1 firmware with C interpreter

As discussed previously, we now have a version of SRV-1 firmware that includes a C interpreter as an alternative to BASIC. A set of SRV-1 specific functions have been included - motors(), ir(), imgcap(), scan(), blob(), colorcap(), colorset(), colorget(), bitdir(), bitset(), bitget() - so it should be possible to develop a variety of interesting behaviors that are controlled by onboard code.

Here's a code sample that uses some of these functions ...

/* capture color sample for scan() function */
int _x, _y, _z, _ymin, _ymax, _umin, _umax, _vmin, _vmax;
main()
{
   int ix;
   imgcap();
   colorcap(1, 30, 50, 1, 5);
   colorget(1);
   print(_ymin _ymax _umin _umax _vmin _vmax);
   do
   {
     imgcap();
     scan(1);
     print("test" _x _y _z);
     ix = input();
   } while (ix != 65); /* continue running until input = 'A' */
}

We'll start to build a libary of code samples, and welcome contributions from users.

There are now 2 versions of firmware - one that includes BASIC and one the includes C. The BASIC version is almost identical to the 120206 firmware release, with 3 minor changes -
  • the MOTORS command now has a comma between the left and right motor settings, so parentheses are no longer needed for negative values, e.g. MOTORS 50, -50
  • we fixed a bug in the BLOB function which ignored the color # and only used color #0, so BLOB 5 would have returned results from BLOB 0
  • we increased the maximum program size from 1024 to 4096 bytes

Here are the latest download links for both versions of firmware -

Please post any problems, suggestions, and/or interesting code samples on the Surveyor Robotics Forum.

Posted Wed, 27 Dec 2006 13:57 | HTML Link | see additional stories ...

Sun, 24 Dec 2006

lens experiment

We recently received some samples of alternative lenses for the SRV-1 camera module, and took some comparison snapshots today in relatively low light. The new lenses are designed primarily for monochrome cameras, as they have no IR coating, and the ambient IR tends to wash out the color sensitivity of the camera imaging element. However, these lenses have significantly better light sensitivity, so there is always a tradeoff.

Here is a group shot of the 3 news lenses below the camera module with the standard lens. The standard lens is F2.8 with a 57-deg field of view (FOV). The lens on the lower left is F2.0 with a 66-deg FOV, the middle one is F.20 with 86-deg FOV, and the bottom is F2.5 with 118-deg FOV



Here are snapshots from the robot in approx the same position with no lighting change. First is the standard lens (57-deg) -



Next is the F2.0 66-deg lens -



Next is the F2.0 86-deg lens -



Finally, the wide angle F2.5 118-deg lens -



You can see how the colors wash out with the uncoated lenses, though it is easy to see the difference in light sensitivity. It would be interesting to find versions of these new lenses that have IR coating, since that might provide an ideal combination, though there might be application for the uncoated lenses.

Posted Sun, 24 Dec 2006 16:29 | HTML Link | see additional stories ...

Wed, 20 Dec 2006

C interpreter for SRV-1

We're a few days away from wrapping up a version of firmware that includes a C interpreter running onboard the robot. This will be similar in structure to our BASIC interpreter, with a set of built-in robot-specific functions for motion control, IR, timing, image capture, color management, and image processing (like the functions we added to BASIC). The C language itself is interpreted, so you just store the program source code in the flash memory and issue a command to run the program. I believe our C implementation is comparable in functionality to RobotC or InteractiveC, though I haven't looked at a full specification for those languages - we don't have complex data structures, but we do have a reasonable set of flow control commands (if, else, for, do, while, return), nested loops, nested function calls, etc.

At this point, we're not going to try to fit both BASIC and C into the same firmware image, so we will provide 2 versions of SRV-1 firmware - one with BASIC and one with C. From a coding standpoint, this isn't an issue, as there is a simple #ifdef in the source code to select between the languages, and all other aspects of the SRV-1 functionality will be identical between the two versions.

I'm personally pretty excited about this addition, as it should be quite helpful for users to have familiar language options like C and BASIC for onboard scripting of autonomous robot behaviors in addition to the host-based tools that are adding SRV-1 support (e.g. Microsoft Robotics Studio, Pryo, Webots, URBI, Player, SRV1Console, etc). Once this code release is complete, we will focus some energy on providing some sample onboard programs in C and BASIC for various functions, including the wander mode, object location and object tracking.

Posted Wed, 20 Dec 2006 18:45 | HTML Link | see additional stories ...

Mon, 11 Dec 2006

New Python-based SRV1Console for SRV-1

We've created a Python-based version of the SRV1Console with some added features, including the ability to edit the flash memory, check the firmware version, run the firmware update program, and test the image processing functions. Here is the download link -

      pySRV1Console-121106.zip (3.6MB)

At the moment, the displayed video frame rate is somewhat lower than the java version of SRV1Console, and the image processing commands still need some work, but this console is a *lot* easier to extend than the Java version, and we should be able to resolve the performance issues.





If you want to run from source (SRV1Console.py), you'll need Python 2.4 and the PySerial package (http://pyserial.sourceforge.net/).

If you have Python installed, the console is started with:

      python SRV1Console.py -com /dev/cu.SLAB_USBtoUART
or
      python SRV1Console.py -com COM4

If you don't have Python installed, there's an SRV1Console.exe which should run on Windows without any Python libraries installed. The command line parameters are the same as the Java SRV1Console, with one addition: '-com' to specify the com port string:

      SRV1Console -com COM4

Once it's running, the main console page is:

      http://localhost:8888/view.html

Note that at the moment, the video may work only in Firefox, and the vision features are currently incomplete - the srv_command() JavaScript function replaces the strings 'x1', 'x2', 'y1' and 'y2' with the corresponding box coordinates, but we haven't fully tested the sending/receiving of vision commands to/from the SRV-1.

We'll set up a discussion/troubleshooting thread in the Software section of the Surveyor Robotics Forum

Posted Mon, 11 Dec 2006 17:37 | HTML Link | see additional stories ...

Thu, 07 Dec 2006

Surveyor SRV-1 support in Microsoft Robotics Studio (MSRS)

     

There is now support for the SRV-1 in Microsoft Robotics Studio. The MSRS SRV-1 services were developed by SharpLogic Software, and while work continues to add some of the new SRV-1 image processing functions, there's already a nice collection of camera and motors services.

To download and configure the SRV-1 MSRS services, go to
For configuration and troubleshooting help, especially with MSRS, check

  • User Forum for Microsoft Robotics Studio, and

  • User Forum for Surveyor SRV-1

    Posted Thu, 07 Dec 2006 15:29 | HTML Link | see additional stories ...

    Sat, 02 Dec 2006

    one last set of firmware changes (120206 firmware)

    We are going to wrap up this version of firmware, so the SRV_protocol is now frozen, at least for this release. We made these final changes -
    • the flash memory commands have been simplified to just "zw" and "zr", and up to 1024 bytes can be written or read, with the data terminated by a null (\0). internally, the flash sector is actually 8192 bytes, so we can increase the 1024 byte limit if we get any user requests. also, for testing these commands from the keyboard, since some keyboards won't generate a null character, you can terminate the "zw" data string with a ^A (control-A), and that will be processed as a null (e.g. "zwthis is a test of writing to the srv-1 flash memory^A" then confirm the flash write with "zr")

    • the INPUT command in BASIC has been activated, and it's a simple non-blocking read - it just looks for a single character from the serial channel (radio), and if a character is found, it is stored in the 'X' variable. if nothing is found, then X is set to 0

    Here's a variation of the previous BASIC example that uses the INPUT command - the program will continue to loop until the INPUT command receives a character via the serial port / radio :

    COLORCAP 1 25 55 1 8
    100 IMGCAP
    SCAN 1
    PRINT X,Y,Z
    INPUT
    IF X = 0 THEN GOTO 100
    END

    Here are the latest download links -

    Posted Sat, 02 Dec 2006 16:11 | HTML Link | see additional stories ...



    Webots 5.1.11 from Cyberbotics will include support for SRV-1

    The upcoming release of Webots 5 will include full 3D simulator support for the SRV-1, including camera and IR sensors, realistic physics for the dual-motor tread drive, and SRV_protocol commands. Cyberbotics has done an amazing job in modeling the SRV-1, as can be seen from this video (click on the image) -



    For more information on Webots, visit the Cyberbotics website

    If you have trouble accessing the video, there's a version posted on YouTube -
        http://youtube.com/watch?v=6N2EMP_u5AM
    (thanks to Prof Doug Blank of Bryn Mawr College / IPRE)

    Posted Sat, 02 Dec 2006 15:44 | HTML Link | see additional stories ...


  •