SRserver  is the core of the spatial reasoning system developed by the University of Missouri - Columbia and the Naval Center for Applied Research in Artificial Intelligence at the Naval Research Laboratory in Washington, D.C. This piece of software draws heavily on work previously done by Dr. Pascal Matsakis et al involving the Histogram of Forces.
At the heart of SRserver is the spatial reasoning commands. These commands are generated using evidence grid maps that are generated from the mapserver program to allow the robot to infer about its surroundings. Additionally, SRserver can generate linguistic descriptions about objects in the map and their relationship to the robot (e.g. the robot will say "The object number 4 is to the right of me, the object number 5 is to the left-front of me, etc.).
Along with these capabilities, SRserver is capable of sending this information to any other program that can communicate through TCP/IP on port 5018 (this is Wax's SPATIAL_PORT and can be changed). In order to get SRserver to respond through this communication mode, you must setup communications with it by using the Wax Comm package (namely robost_read and robust_write). For examples on how to set up these links for communication, look at the democlient source code in the appropriate SR directory.
The following table lists the possible commands that one can issue to SRserver from a remote client and the action that will occur:
| Command Token | Action/Result |
|---|---|
| GET_NUM_OBJECTS | Segments and labels the current grid map and returns the number of objects |
| GET_HL_DESCRIPTION | Returns the high-level description of the map from the robot's perspective |
| GET_NEAREST_OBJECT [DIR] | Returns the nearest object in the direction DIR |
| GET_DET_DESCRIP [OBJ_NUM|POBJ_NAME] | Gets a detailed description for object number OBJ_NUM or persistent object named POBJ_NAME |
| ASSIGN_LABEL [OBJ_NUM] [LABEL] | Assings object number OBJ_NUM the label LABEL |
| ASSIGN_LABEL_DIR [DIR] [LABEL] | Assigns the label LABEL to the object in direction DIR |
| GET_OBJ_DESC [OBJ_NUM|POBJ_NAME] | Gets the linguistic description of object number OBJ_NUM or the persistent object labelled POBJ_NAME |
| GET_RIGHT_POINT [OBJ_NUM|POBJ_NAME] | Finds a point to the right of object OBJ_NUM or persistent object POBJ_NAME |
| GET_LEFT_POINT [OBJ_NUM|POBJ_NAME] | Finds a point to the left of object OBJ_NUM or persistent object POBJ_NAME |
| GET_BACK_POINT [OBJ_NUM|POBJ_NAME] | Finds a point in the back of object OBJ_NUM or persistent object POBJ_NAME |
| GET_FRONT_POINT [OBJ_NUM|POBJ_NAME] | Finds a point in front of object OBJ_NUM or persistent object POBJ_NAME |
| GET_LRFB_POINTS [OBJ_NUM|POBJ_NAME] | Finds all four points around an object OBJ_NUM or persistent object POBJ_NAME |
| *GET_BETWEEN [OBJ_1] [OBJ_2] | Finds a point between OBJ_1 and OBJ_2 |
Error/Signal Handling  in SRserver is handled the same way as it is in all of Wax. On a ^C, the server exits gracefully and closes all network connections that it currently has open. Note that you need to make sure to kill off ALL processes in the order that they were started, otherwise you will encounter hanging sockets.
Also, SRserver has checks for garbage input of server commands. Beware that there is a certain sequence of commands that must be entered in the command string in order to communicate effectively, and that the lack of certain key words in the command string can lead to a "garbage" command. See democlient.c for examples on how to effectively communicate with SRserver.
That's SRserver in a nutshell. Naturally, as with all things in life, it's far more complicated than that. ;-)