Stg Namespace Reference

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

Namespaces

 Gl
 

Classes

class  Ancestor
 
struct  blinkenlight_t
 
class  Block
 
class  BlockGroup
 
class  Bounds
 
class  bounds3d_t
 
class  Camera
 
class  Canvas
 
class  Cell
 
class  Color
 
class  CProperty
 Property class. More...
 
class  CtrlArgs
 
class  FileManager
 
struct  fov_t
 
class  Geom
 
class  LogEntry
 
class  Model
 Model class More...
 
class  ModelActuator
 ModelActuator class More...
 
class  ModelBlinkenlight
 
class  ModelBlobfinder
 ModelBlobfinder class More...
 
class  ModelBumper
 ModelBumper class More...
 
class  ModelCamera
 ModelCamera class More...
 
class  ModelFiducial
 ModelFiducial class More...
 
class  ModelGripper
 
class  ModelLightIndicator
 
class  ModelPosition
 ModelPosition class More...
 
class  ModelRanger
 ModelRanger class More...
 
class  Option
 
class  OptionsDlg
 
class  OrthoCamera
 
class  PerspectiveCamera
 
class  point3_t
 
class  point_int_t
 
class  point_t
 
class  Pose
 
class  PowerPack
 
class  Ray
 
class  RaytraceResult
 
class  Region
 
struct  rotrect_t
 
class  Size
 
class  StripPlotVis
 
class  SuperRegion
 
class  TextureManager
 Singleton for loading textures (not threadsafe) More...
 
class  Velocity
 
class  Visualizer
 
class  World
 World class More...
 
class  Worldfile
 
class  WorldGui
 

Typedefs

typedef Model *(* creator_t) (World *, Model *, const std::string &type)
 
typedef uint32_t id_t
 
typedef double joules_t
 
typedef double kg_t
 
typedef double meters_t
 
typedef int(* model_callback_t) (Model *mod, void *user)
 
typedef unsigned long msec_t
 
typedef double radians_t
 
typedef bool(* ray_test_func_t) (Model *candidate, const Model *finder, const void *arg)
 
typedef struct timeval time_t
 
typedef uint64_t usec_t
 
typedef double watts_t
 
typedef int(* world_callback_t) (World *world, void *user)
 

Enumerations

enum  { FiducialNone = 0 }
 

Functions

const int32_t CELLMASK (~((~0x00u)<< RBITS))
 
double constrain (double val, double minval, double maxval)
 return val, or minval if val < minval, or maxval if val > maxval More...
 
double dtor (double d)
 
template<class T , class C >
void EraseAll (T thing, C &cont)
 
unsigned int FullVersion ()
 
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)
 
int polys_from_image_file (const std::string &filename, std::vector< std::vector< point_t > > &polys)
 rotated rectangle More...
 
const uint32_t RBITS (5)
 
const int32_t REGIONMASK (~((~0x00u)<< SRBITS))
 
const int32_t REGIONSIZE (REGIONWIDTH *REGIONWIDTH)
 
const int32_t REGIONWIDTH (1<< RBITS)
 
void RegisterModels ()
 
double rtod (double r)
 
const uint32_t SBITS (5)
 
double sgn (double a)
 
int sgn (int a)
 
const uint32_t SRBITS (RBITS+SBITS)
 
const int32_t SUPERREGIONSIZE (SUPERREGIONWIDTH *SUPERREGIONWIDTH)
 
const int32_t SUPERREGIONWIDTH (1<< SBITS)
 
point_tunit_square_points_create ()
 
const char * Version ()
 

Variables

const char AUTHORS []
 
const double billion = 1e9
 
const char COPYRIGHT [] = "Copyright Richard Vaughan and contributors 2000-2017"
 
const char DESCRIPTION [] = "Robot simulation library\nPart of the Player Project"
 
const char LICENSE []
 
const double million = 1e6
 
const double thousand = 1e3
 
const char WEBSITE [] = "http://playerstage.org"
 

Detailed Description

The Stage library uses its own namespace.

Typedef Documentation

◆ creator_t

typedef Model*(* Stg::creator_t) (World *, Model *, const std::string &type)

◆ id_t

typedef uint32_t Stg::id_t

Value that uniquely identifies a model

◆ joules_t

typedef double Stg::joules_t

Joules: unit of energy

◆ kg_t

typedef double Stg::kg_t

Kilograms: unit of mass

◆ meters_t

typedef double Stg::meters_t

Metres: floating point unit of distance

◆ model_callback_t

typedef int(* 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.

◆ msec_t

typedef unsigned long Stg::msec_t

Milliseconds: unit of (short) time

◆ radians_t

typedef double Stg::radians_t

Radians: unit of angle

◆ ray_test_func_t

typedef bool(* Stg::ray_test_func_t) (Model *candidate, const 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

◆ time_t

typedef struct timeval Stg::time_t

time structure

◆ usec_t

typedef uint64_t Stg::usec_t

Microseconds: unit of (very short) time

◆ watts_t

typedef double Stg::watts_t

Watts: unit of power (energy/time)

◆ world_callback_t

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

any integer value other than this is a valid fiducial ID

Enumerator
FiducialNone 

Function Documentation

◆ CELLMASK()

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

◆ constrain()

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

return val, or minval if val < minval, or maxval if val > maxval

◆ dtor()

double Stg::dtor ( double  d)
inline

convert an angle in degrees to radians.

◆ EraseAll()

template<class T , class C >
void Stg::EraseAll ( thing,
C &  cont 
)

wrapper for Erase-Remove method of removing all instances of thing from container

◆ FullVersion()

unsigned int Stg::FullVersion ( )

returns the full numeric version as $major$minor$patch of libstage for programmatic checks

◆ GETCELL()

int32_t Stg::GETCELL ( const int32_t  x)
inline

◆ GETREG()

int32_t Stg::GETREG ( const int32_t  x)
inline

◆ GETSREG()

int32_t Stg::GETSREG ( const int32_t  x)
inline

◆ Init()

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

Initialize the Stage library. Stage will parse the argument array looking for parameters in the conventional way.

◆ InitDone()

bool Stg::InitDone ( )

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

◆ normalize()

double Stg::normalize ( double  a)
inline

Normalize an angle to within +/_ M_PI.

◆ polys_from_image_file()

int Stg::polys_from_image_file ( const std::string &  filename,
std::vector< std::vector< point_t > > &  polys 
)

rotated rectangle

load the image file [filename] and convert it to a vector of polygons

◆ RBITS()

const uint32_t Stg::RBITS ( )

◆ REGIONMASK()

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

◆ REGIONSIZE()

const int32_t Stg::REGIONSIZE ( REGIONWIDTH REGIONWIDTH)

◆ REGIONWIDTH()

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

◆ RegisterModels()

void Stg::RegisterModels ( )

Map model names to named constructors for each model type

◆ rtod()

double Stg::rtod ( double  r)
inline

convert an angle in radians to degrees.

◆ SBITS()

const uint32_t Stg::SBITS ( )

◆ sgn() [1/2]

double Stg::sgn ( double  a)
inline

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

◆ sgn() [2/2]

int Stg::sgn ( int  a)
inline

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

◆ SRBITS()

const uint32_t Stg::SRBITS ( RBITS SBITS)

◆ SUPERREGIONSIZE()

const int32_t Stg::SUPERREGIONSIZE ( SUPERREGIONWIDTH SUPERREGIONWIDTH)

◆ SUPERREGIONWIDTH()

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

◆ unit_square_points_create()

point_t * Stg::unit_square_points_create ( )

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

◆ Version()

const char * Stg::Version ( )

returns a human readable string indicating the libstage version number.

Variable Documentation

◆ AUTHORS

const char Stg::AUTHORS[]
Initial value:
= "Richard Vaughan, Brian Gerkey, Andrew Howard, Reed Hedges, Pooya Karimian, "
"Toby Collett, Jeremy Asher, Alex Couture-Beil, Adrian Böckenkamp and "
"contributors."

Author string

◆ billion

const double Stg::billion = 1e9

Convenient constant

◆ COPYRIGHT

const char Stg::COPYRIGHT[] = "Copyright Richard Vaughan and contributors 2000-2017"

Copyright string

◆ DESCRIPTION

const char Stg::DESCRIPTION[] = "Robot simulation library\nPart of the Player Project"

Project description string

◆ LICENSE

const char Stg::LICENSE[]
Initial value:
=
"Stage robot simulation library\n"
"Copyright (C) 2000-2017 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

◆ million

const double Stg::million = 1e6

Convenient constant

◆ thousand

const double Stg::thousand = 1e3

Convenient constant

◆ WEBSITE

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

Project website string