Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Sparrow

From DGC Wiki

Sparrow is a real-time, dynamic display utility that provides a simple mechanism for displaying and manipulating information on an ASCII terminal. It is used as a front end for a number of the embedded systems and planning team modules.

If you like Sparrow, you might also be interested in SparrowHawk (C++ interface with enhanced functionality) and Falcon (library of functions for implementing control laws).

Contents

  

Quick Links

Component Description

Component Specifications

The main specifications for sparrow are to be compatible with the race hardware and to run in near real-time, with minimal overhead.

</tr> </table>

Interface Specifications

Name Specification descriptionTest to verifyStatus
Curses

Provide a curses interface that allows color text on race computers

Run chntest on race computers and verify color text displays correctly.

This can be tested at any time. Not a blocker.

Real-Time Operation

Update display at 10 Hz with less than 1% CPU loading

Execute chntest and verify using top that less than 1% of CPU is being used.

This can be tested at any time. Not a blocker.

Name Interface descriptionComponentsOwnerStatus
Planning

Sparrow is called by a variety of embedded, planning and terrain modules

vdrive, vstate, adrive, astate, path follower, mode management, LADAR mapper

Richard Murray

Currently operational

</table>

Additional Information

Compiling sparrow on your own linux

While installing linux on my own laptop I found that these packages are required for sparrow to compile (and I didn't find any documentation about this elsewhere so here it is):

  • bison (for yacc)
  • curses (also had to do in /usr/lib # ln -s libcurses.so.1 libcurses.so)
  • termcap (also had to do in /usr/lib # ln -s libtermcap.so.2 libtermcap.so)
  • texinfo (for the makeinfo program)
  • ncurses

You might also need the lib- version of curses/termcap and the -devel version.

--Henrik 20:02, 10 Aug 2004 (PDT)

Using the sparrow interface

Building a sparrow interface is quite a large task. Easiest is probably to look at some of the existing modules like dgc/bob/RaceModules/Arbiter2, dgc/bob/RaceModules/LADARMapper or dgc/bob/DevModules/StereoMapper and copy the SparrowDisplayLoop() and UpdateSparrowVariablesLoop() for modifying later.

To use debug messages easily, the last row in the sparrow display can be used for printing strings with:

DD_PROMPT(char* text);

--Henrik 00:12, 15 Oct 2004 (PDT)

Creating second level displays in sparrow

If you display is getting too crowded, you can create a secondary display table in sparrow. These are usually bound to a button at the top or bottom of the screen, so that you can click to switch to a new view.

To create a second display screen, you first have to create a .dd file that defines what you want to see. This is done just as normal, but you need to make sure to use the 'tblname' and 'bufname' entries in your .dd file to give unique names to the display and buffer tables:

tblname: astune;
bufname: astune_buf;

You now need to include both of the .h files generated by cdd. If you call one display table from the other, you should define the second table first (so that the variables are defined). Alternatively, you can include the following lines at the top of your .dd file:

DD_IDENT *astune;

Now you need to call the new table from the old one. To do this, just create a buttom entry of the following form:

button: %TUNE "TUNE" dd_usetbl_cb -userarg=astune;

The function 'dd_usetbl_cb' is defined in sparrow and changes the display to the one pointed to by the argument to the '-userarg' option. Inside of your new table, you can either link back to the first table with an explicit buttom, or use the 'dd_prvtbl_cb' function, which will return you to the previous table (only one previous table is stored, just in case you are thinking you can get fancy with display hierarchies):

button: %RETURN "RETURN" dd_prvtbl_cb;
--Murray 13:51, 2 Jul 2005 (PDT)

Retrieved from "http://kincora.cds.caltech.edu../../../s/p/a/Sparrow.html"

This page has been accessed 334 times. This page was last modified 06:26, 19 December 2006 by Richard Murray. Based on work by DGC Wiki user(s) Henrik.


[Main Page]
Main Page
Alice Docs
DGC07
DGC05
Categories
Recent changes
Help

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports