libstage API reference


Detailed Description

libstage (The Stage Library) provides a C code library for simulating a population of mobile robots and sensors. It is usually used as a plugin driver for Player, but it can also be used directly to build custom simulations.

libstage is modular and fairly simple to use. The following code is enough to get a complete robot simulation running:

#include "stage.h"

int main( int argc, char* argv[] )
{ 
  stg_init( argc, argv );

  stg_world_t* world = stg_world_create_from_file( argv[1] );
  
  while( (stg_world_update( world,TRUE )==0) )
    {}
  
  stg_world_destroy( world );
  
  return 0;
}

Contact and support
For help with libstage, please use the mailing list playerstage_users@lists.sourceforge.net.


Modules

 Measurement Types
 Points
 Polylines
 Polygons
 Worlds
 Models
 Utilities
 Internals

Defines

#define FiducialNone   0
#define STG_TOKEN_MAX   64

Typedefs

typedef _stg_model stg_model_t
typedef _stg_world stg_world_t

Functions

int stg_init (int argc, char **argv)
void stg_quit_request (void)
int stg_quit_test (void)
stg_msec_t stg_timenow (void)
const char * stg_version_string (void)

Define Documentation

#define FiducialNone   0
 

any integer value other than this is a valid fiducial ID

#define STG_TOKEN_MAX   64
 

Limit the length of the character strings that identify models


Typedef Documentation

typedef struct _stg_model stg_model_t
 

typedef struct _stg_world stg_world_t
 


Function Documentation

int stg_init int  argc,
char **  argv
 

Initialize the stage library. Optionally pass in the arguments from main(), so Stage can read cmdline options. Stage then passes the arguments to GTK+ and Xlib so they can read their own options.

void stg_quit_request void   ) 
 

set stage's quit flag. Stage will quit cleanly very soon after this function is called.

int stg_quit_test void   ) 
 

if stage wants to quit, this will return non-zero

stg_msec_t stg_timenow void   ) 
 

Returns the real (wall-clock) time in milliseconds since the simulation started.

const char* stg_version_string void   ) 
 

Get a string identifying the version of stage. The string is generated by autoconf


Generated on Thu Dec 13 13:55:22 2007 for Stage by  doxygen 1.4.6