Stg Namespace Reference

The Stage library uses its own namespace. More...


Namespaces

namespace  Gl

Classes

class  Ancestor
class  Block
class  BlockGroup
class  Bounds
class  CallbackHooks
class  Camera
class  Canvas
class  Cell
class  Color
struct  CProperty
class  FileManager
class  Flag
class  Geom
class  GuiState
class  LogEntry
class  Model
 Model class More...
class  ModelActuator
 ModelActuator class More...
class  ModelBlinkenlight
class  ModelBlobfinder
 ModelBlobfinder class More...
class  ModelCamera
 ModelCamera class More...
class  ModelFiducial
 ModelFiducial class More...
class  ModelGripper
class  ModelLaser
 ModelLaser class More...
class  ModelLightIndicator
class  ModelLoadCell
 ModelLoadCell class More...
class  ModelPosition
 ModelPosition class More...
class  ModelRanger
 ModelRanger class More...
class  Option
class  OptionsDlg
class  OrthoCamera
class  PerspectiveCamera
class  Pose
class  PowerPack
class  Ray
class  RaytraceResult
class  Region
class  Size
struct  stg_blinkenlight_t
class  stg_bounds3d_t
struct  stg_fov_t
class  stg_point3_t
class  stg_point_int_t
class  stg_point_t
struct  stg_rotrect_t
class  StripPlotVis
class  SuperRegion
class  TextureManager
 Singleton for loading textures (not threadsafe). More...
class  TrailItem
class  Velocity
class  Visibility
class  Visualizer
class  Waypoint
class  World
 World class More...
class  Worldfile
class  WorldGui

Typedefs

typedef std::vector< Block * > BlockPtrVec
typedef std::vector< Cell * > CellPtrVec
typedef int ctrlinit_t (Model *mod)
typedef std::set< Model * > ModelPtrSet
typedef std::vector< Model * > ModelPtrVec
typedef std::vector
< stg_point_int_t
PointIntVec
typedef bool stg_bool_t
typedef Model *(* stg_creator_t )(World *, Model *)
typedef uint32_t stg_id_t
typedef double stg_joules_t
typedef double stg_kg_t
typedef double stg_meters_t
typedef int(* stg_model_callback_t )(Model *mod, void *user)
typedef uint32_t stg_movemask_t
typedef unsigned long stg_msec_t
typedef double stg_radians_t
typedef bool(* stg_ray_test_func_t )(Model *candidate, Model *finder, const void *arg)
typedef RaytraceResult stg_raytrace_result_t
typedef struct timeval stg_time_t
typedef uint64_t stg_usec_t
typedef double stg_watts_t
typedef int(* stg_world_callback_t )(World *world, void *user)
typedef std::pair< const char
*, stg_creator_t
TypeEntry

Enumerations

enum  { FiducialNone = 0 }
enum  stg_laser_return_t { LaserTransparent = 0, LaserVisible, LaserBright }
 laser return value More...
enum  stg_model_type_t {
  MODEL_TYPE_PLAIN = 0, MODEL_TYPE_LASER, MODEL_TYPE_FIDUCIAL, MODEL_TYPE_RANGER,
  MODEL_TYPE_POSITION, MODEL_TYPE_BLOBFINDER, MODEL_TYPE_BLINKENLIGHT, MODEL_TYPE_CAMERA,
  MODEL_TYPE_GRIPPER, MODEL_TYPE_ACTUATOR, MODEL_TYPE_LOADCELL, MODEL_TYPE_LIGHTINDICATOR,
  MODEL_TYPE_COUNT
}

Functions

const int32_t CELLMASK (~((~0x00)<< RBITS))
double constrain (double val, double minval, double maxval)
double dtor (double d)
int32_t GETCELL (const int32_t x)
int32_t GETREG (const int32_t x)
int32_t GETSREG (const int32_t x)
void Init (int *argc, char **argv[])
bool InitDone ()
double normalize (double a)
const int32_t RBITS (5)
const int32_t REGIONMASK (~((~0x00)<< SRBITS))
const int32_t REGIONSIZE (REGIONWIDTH *REGIONWIDTH)
const int32_t REGIONWIDTH (1<< RBITS)
void RegisterModels ()
double rtod (double r)
const int32_t SBITS (5)
double sgn (double a)
int sgn (int a)
const int32_t SRBITS (RBITS+SBITS)
int stg_rotrects_from_image_file (const char *filename, stg_rotrect_t **rects, unsigned int *rect_count, unsigned int *widthp, unsigned int *heightp)
stg_point_tstg_unit_square_points_create ()
const int32_t SUPERREGIONSIZE (SUPERREGIONWIDTH *SUPERREGIONWIDTH)
const int32_t SUPERREGIONWIDTH (1<< SBITS)
const char * Version ()

Variables

const char AUTHORS []
 Author string.
const double billion = 1e9
const char COPYRIGHT []
 Copyright string.
const char DESCRIPTION []
 Project description string.
const uint32_t INTERVAL_LOG_LEN = 32
const char LICENSE []
 Project distribution license string.
const double million = 1e6
const char MP_COLOR [] = "_mp_color"
const char MP_FIDUCIAL_RETURN [] = "_mp_fiducial_return"
const char MP_GEOM [] = "_mp_geom"
const char MP_GRIPPER_RETURN [] = "_mp_gripper_return"
const char MP_LASER_RETURN [] = "_mp_laser_return"
const char MP_MASS [] = "_mp_mass"
const char MP_OBSTACLE_RETURN [] = "_mp_obstacle_return"
const char MP_POSE [] = "_mp_pose"
const char MP_PREFIX [] = "_mp_"
const char MP_RANGER_RETURN [] = "_mp_ranger_return"
const char MP_VELOCITY [] = "_mp_velocity"
const char MP_WATTS [] = "_mp_watts"
const stg_movemask_t STG_MOVE_ROT = (1 << 1)
 bitmask
const stg_movemask_t STG_MOVE_SCALE = (1 << 2)
 bitmask
const stg_movemask_t STG_MOVE_TRANS = (1 << 0)
 bitmask
const double thousand = 1e3
const uint32_t TOKEN_MAX = 64
const char WEBSITE [] = "http://playerstage.org"
 Project website string.

Detailed Description

The Stage library uses its own namespace.


Typedef Documentation

typedef std::vector<Block*> Stg::BlockPtrVec

Vector of pointers to Blocks.

typedef std::vector<Cell*> Stg::CellPtrVec

Vector of pointers to Cells.

typedef int Stg::ctrlinit_t(Model *mod)

typedef std::set<Model*> Stg::ModelPtrSet

Set of pointers to Models.

typedef std::vector<Model*> Stg::ModelPtrVec

Vector of pointers to Models.

typedef std::vector<stg_point_int_t> Stg::PointIntVec

typedef bool Stg::stg_bool_t

boolean

typedef Model*(* Stg::stg_creator_t)(World *, Model *)

A model creator function. Each model type must define a function of this type.

typedef uint32_t Stg::stg_id_t

Value that uniquely identifies a model

typedef double Stg::stg_joules_t

Joules: unit of energy

typedef double Stg::stg_kg_t

Kilograms: unit of mass

typedef double Stg::stg_meters_t

Metres: floating point unit of distance

typedef int(* Stg::stg_model_callback_t)(Model *mod, void *user)

Define a callback function type that can be attached to a record within a model and called whenever the record is set.

typedef uint32_t Stg::stg_movemask_t

typedef unsigned long Stg::stg_msec_t

Milliseconds: unit of (short) time

typedef double Stg::stg_radians_t

Radians: unit of angle

typedef bool(* Stg::stg_ray_test_func_t)(Model *candidate, Model *finder, const void *arg)

matching function should return true iff the candidate block is stops the ray, false if the block transmits the ray

typedef struct timeval Stg::stg_time_t

time structure

typedef uint64_t Stg::stg_usec_t

Microseconds: unit of (very short) time

typedef double Stg::stg_watts_t

Watts: unit of power (energy/time)

typedef int(* Stg::stg_world_callback_t)(World *world, void *user)

typedef std::pair<const char*, stg_creator_t> Stg::TypeEntry


Enumeration Type Documentation

anonymous enum

any integer value other than this is a valid fiducial ID

Enumerator:
FiducialNone 

laser return value

Enumerator:
LaserTransparent  not detected by laser model
LaserVisible  detected by laser with a reflected intensity of 0
LaserBright  detected by laser with a reflected intensity of 1

Create unique identifying numbers for each type of model, and a count of the number of types.

Enumerator:
MODEL_TYPE_PLAIN 
MODEL_TYPE_LASER 
MODEL_TYPE_FIDUCIAL 
MODEL_TYPE_RANGER 
MODEL_TYPE_POSITION 
MODEL_TYPE_BLOBFINDER 
MODEL_TYPE_BLINKENLIGHT 
MODEL_TYPE_CAMERA 
MODEL_TYPE_GRIPPER 
MODEL_TYPE_ACTUATOR 
MODEL_TYPE_LOADCELL 
MODEL_TYPE_LIGHTINDICATOR 
MODEL_TYPE_COUNT 


Function Documentation

const int32_t Stg::CELLMASK ( (~0x00)<< RBITS  ) 

double Stg::constrain ( double  val,
double  minval,
double  maxval 
)

double Stg::dtor ( double  d  )  [inline]

convert an angle in degrees to radians.

int32_t Stg::GETCELL ( const int32_t  x  )  [inline]

int32_t Stg::GETREG ( const int32_t  x  )  [inline]

int32_t Stg::GETSREG ( const int32_t  x  )  [inline]

void Stg::Init ( int *  argc,
char **  argv[] 
)

Initialize the Stage library

bool Stg::InitDone (  ) 

returns true iff Stg::Init() has been called.

double Stg::normalize ( double  a  )  [inline]

Normalize an angle to within +/_ M_PI.

const int32_t Stg::RBITS (  ) 

const int32_t Stg::REGIONMASK ( (~0x00)<< SRBITS  ) 

const int32_t Stg::REGIONSIZE ( REGIONWIDTH *  REGIONWIDTH  ) 

const int32_t Stg::REGIONWIDTH ( 1<<  RBITS  ) 

void Stg::RegisterModels (  ) 

Map model names to named constructors for each model type

double Stg::rtod ( double  r  )  [inline]

convert an angle in radians to degrees.

const int32_t Stg::SBITS (  ) 

double Stg::sgn ( double  a  )  [inline]

take binary sign of a, either -1, or 1 if >= 0.

int Stg::sgn ( int  a  )  [inline]

take binary sign of a, either -1, or 1 if >= 0

const int32_t Stg::SRBITS ( RBITS+  SBITS  ) 

int Stg::stg_rotrects_from_image_file ( const char *  filename,
stg_rotrect_t **  rects,
unsigned int *  rect_count,
unsigned int *  widthp,
unsigned int *  heightp 
)

load the image file [filename] and convert it to an array of rectangles, filling in the number of rects, width and height. Memory is allocated for the rectangle array [rects], so the caller must free [rects].

stg_point_t * Stg::stg_unit_square_points_create ( void   ) 

create an array of 4 points containing the corners of a unit square.

const int32_t Stg::SUPERREGIONSIZE ( SUPERREGIONWIDTH *  SUPERREGIONWIDTH  ) 

const int32_t Stg::SUPERREGIONWIDTH ( 1<<  SBITS  ) 

const char * Stg::Version (  ) 

returns a human readable string indicating the libstage version number.


Variable Documentation

const char Stg::AUTHORS[]

Initial value:

                    
    "Richard Vaughan, Brian Gerkey, Andrew Howard, Reed Hedges, Pooya Karimian, Toby Collett, Jeremy Asher, Alex Couture-Beil and contributors."
Author string.

const double Stg::billion = 1e9

Convenient constant

const char Stg::COPYRIGHT[]

Initial value:

                       
    "Copyright Richard Vaughan and contributors 2000-2009"
Copyright string.

const char Stg::DESCRIPTION[]

Initial value:

                       
    "Robot simulation library\nPart of the Player Project"
Project description string.

const uint32_t Stg::INTERVAL_LOG_LEN = 32

const char Stg::LICENSE[]

Initial value:

 
    "Stage robot simulation library\n"                  
    "Copyright (C) 2000-2009 Richard Vaughan and contributors\n"    
    "Part of the Player Project [http://playerstage.org]\n"     
    "\n"                                
    "This program is free software; you can redistribute it and/or\n"   
    "modify it under the terms of the GNU General Public License\n" 
    "as published by the Free Software Foundation; either version 2\n"  
    "of the License, or (at your option) any later version.\n"      
    "\n"                                
    "This program is distributed in the hope that it will be useful,\n" 
    "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"  
    "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"   
    "GNU General Public License for more details.\n"            
    "\n"                                
    "You should have received a copy of the GNU General Public License\n" 
    "along with this program; if not, write to the Free Software\n" 
    "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n" 
    "\n"                                
    "The text of the license may also be available online at\n"     
    "http://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n"
Project distribution license string.

const double Stg::million = 1e6

Convenient constant

const char Stg::MP_COLOR[] = "_mp_color"

const char Stg::MP_FIDUCIAL_RETURN[] = "_mp_fiducial_return"

const char Stg::MP_GEOM[] = "_mp_geom"

const char Stg::MP_GRIPPER_RETURN[] = "_mp_gripper_return"

const char Stg::MP_LASER_RETURN[] = "_mp_laser_return"

const char Stg::MP_MASS[] = "_mp_mass"

const char Stg::MP_OBSTACLE_RETURN[] = "_mp_obstacle_return"

const char Stg::MP_POSE[] = "_mp_pose"

const char Stg::MP_PREFIX[] = "_mp_"

const char Stg::MP_RANGER_RETURN[] = "_mp_ranger_return"

const char Stg::MP_VELOCITY[] = "_mp_velocity"

const char Stg::MP_WATTS[] = "_mp_watts"

bitmask

bitmask

bitmask

const double Stg::thousand = 1e3

Convenient constant

const uint32_t Stg::TOKEN_MAX = 64

The maximum length of a Stage model identifier string

const char Stg::WEBSITE[] = "http://playerstage.org"

Project website string.


Generated on Wed Jul 22 11:51:05 2009 for Stage by  doxygen 1.5.9