Stg Namespace Reference
Detailed Description
The Stage library uses its own namespace
Classes | |
struct | ColoredVertex |
struct | CProperty |
class | FileManager |
class | GlColorStack |
class | Option |
class | OptionsDlg |
class | Region |
struct | stg_bbox3d_t |
struct | stg_bigblock_t |
struct | stg_blinkenlight_t |
struct | stg_blobfinder_blob_t |
struct | stg_bounds3d_t |
struct | stg_bounds_t |
struct | stg_cb_t |
struct | stg_colorvertex_t |
struct | stg_energy_config_t |
struct | stg_energy_data_t |
struct | stg_fiducial_config_t |
struct | stg_fiducial_t |
struct | stg_fov_t |
struct | stg_geom_t |
struct | stg_laser_cfg_t |
struct | stg_laser_sample_t |
struct | stg_point3_t |
struct | stg_point_int_t |
struct | stg_point_t |
struct | stg_pose_t |
struct | stg_range_bounds_t |
struct | stg_ranger_sensor_t |
struct | stg_raytrace_sample_t |
struct | stg_render_info_t |
struct | stg_rotrect_t |
struct | stg_size_t |
struct | stg_trail_item_t |
struct | stg_typetable_entry_t |
struct | stg_vertex_t |
class | StgAncestor |
class | StgBlock |
class | StgBlockGrid |
class | StgCamera |
class | StgCanvas |
class | StgFlag |
class | StgModel |
StgModel class More... | |
class | StgModelBlinkenlight |
class | StgModelBlobfinder |
StgModelBlobfinder class More... | |
class | StgModelCamera |
StgModelCamera class More... | |
class | StgModelFiducial |
StgModelFiducial class More... | |
class | StgModelLaser |
StgModelLaser class More... | |
class | StgModelPosition |
StgModelPosition class More... | |
class | StgModelRanger |
StgModelRanger class More... | |
class | StgOrthoCamera |
class | StgPerspectiveCamera |
class | StgWorld |
StgWorld class More... | |
class | StgWorldGui |
class | SuperRegion |
class | Worldfile |
Typedefs | |
typedef int | ctrlinit_t (StgModel *mod) |
typedef bool(*) | stg_block_match_func_t (StgBlock *candidate, StgModel *finder, const void *arg) |
typedef uint32_t | stg_bool_t |
typedef uint32_t | stg_color_t |
typedef StgModel *(*) | stg_creator_t (StgWorld *, StgModel *) |
typedef uint32_t | stg_id_t |
typedef double | stg_joules_t |
typedef double | stg_kg_t |
typedef int(*) | stg_line3d_func_t (int32_t x, int32_t y, int32_t z, void *arg) |
typedef double | stg_meters_t |
typedef int(*) | stg_model_callback_t (StgModel *mod, void *user) |
typedef int(*) | stg_model_callback_t (StgModel *mod, void *user) |
typedef uint32_t | stg_movemask_t |
typedef unsigned long | stg_msec_t |
typedef double | stg_radians_t |
typedef timeval | stg_time_t |
typedef uint64_t | stg_usec_t |
typedef stg_pose_t | stg_velocity_t |
typedef double | stg_watts_t |
Enumerations | |
enum | { FiducialNone = 0 } |
enum | stg_image_format_t { STG_IMAGE_FORMAT_PNG, STG_IMAGE_FORMAT_JPG } |
enum | stg_laser_return_t { LaserTransparent, 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_COUNT } |
enum | stg_position_control_mode_t { STG_POSITION_CONTROL_VELOCITY, STG_POSITION_CONTROL_POSITION } |
enum | stg_position_drive_mode_t { STG_POSITION_DRIVE_DIFFERENTIAL, STG_POSITION_DRIVE_OMNI, STG_POSITION_DRIVE_CAR } |
enum | stg_position_localization_mode_t { STG_POSITION_LOCALIZATION_GPS, STG_POSITION_LOCALIZATION_ODOM } |
Functions | |
stg_cb_t * | cb_create (stg_model_callback_t callback, void *arg) |
void | cb_destroy (stg_cb_t *cb) |
double | constrain (double val, double minval, double maxval) |
double | dtor (double d) |
void | gl_coord_shift (double x, double y, double z, double a) |
void | gl_draw_grid (stg_bounds3d_t vol) |
void | gl_draw_octagon (float w, float h, float m) |
void | gl_draw_string (float x, float y, float z, const char *str) |
void | gl_pose_shift (stg_pose_t *pose) |
void | gl_speech_bubble (float x, float y, float z, const char *str) |
void | Init (int *argc, char **argv[]) |
bool | InitDone () |
stg_pose_t | new_pose (stg_meters_t x, stg_meters_t y, stg_meters_t z, stg_radians_t a) |
double | normalize (double a) |
stg_pose_t | pose_sum (stg_pose_t p1, stg_pose_t p2) |
stg_pose_t | random_pose (stg_meters_t xmin, stg_meters_t xmax, stg_meters_t ymin, stg_meters_t ymax) |
void | RegisterModel (stg_model_type_t type, const char *name, stg_creator_t creator) |
void | RegisterModels () |
void | RegisterModels () |
double | rtod (double r) |
double | sgn (double a) |
int | sgn (int a) |
void | stg_block_list_destroy (GList *list) |
void | stg_block_list_scale (GList *blocks, stg_size_t *size) |
stg_color_t | stg_color_pack (double r, double g, double b, double a) |
void | stg_color_unpack (stg_color_t col, double *r, double *g, double *b, double *a) |
int | stg_line_3d (int32_t x, int32_t y, int32_t z, int32_t dx, int32_t dy, int32_t dz, stg_line3d_func_t visit_voxel, void *arg) |
stg_color_t | stg_lookup_color (const char *name) |
stg_point_t * | stg_points_create (size_t count) |
void | stg_points_destroy (stg_point_t *pts) |
int | stg_polygon_3d (stg_point_int_t *pts, unsigned int pt_count, stg_line3d_func_t visit_voxel, void *arg) |
void | stg_pose_sum (stg_pose_t *result, stg_pose_t *p1, stg_pose_t *p2) |
void | stg_print_err (const char *err) |
void | stg_print_geom (stg_geom_t *geom) |
void | stg_print_pose (stg_pose_t *pose) |
void | stg_print_velocity (stg_velocity_t *vel) |
stg_msec_t | stg_realtime (void) |
stg_msec_t | stg_realtime_since_start (void) |
int | stg_rotrects_from_image_file (const char *filename, stg_rotrect_t **rects, unsigned int *rect_count, unsigned int *widthp, unsigned int *heightp) |
void | stg_rotrects_normalize (stg_rotrect_t *rects, int num) |
stg_point_t * | stg_unit_square_points_create (void) |
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 uint32_t | STG_MOVE_ROT = (1 << 1) |
const uint32_t | STG_MOVE_SCALE = (1 << 2) |
const uint32_t | STG_MOVE_TRANS = (1 << 0) |
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" |
const double | thousand = 1e3 |
const uint32_t | TOKEN_MAX = 64 |
stg_typetable_entry_t | typetable [MODEL_TYPE_COUNT] |
const char | WEBSITE [] = "http://playerstage.org" |
Project website string. |
Typedef Documentation
typedef uint32_t Stg::stg_bool_t |
boolean
typedef uint32_t Stg::stg_color_t |
32-bit ARGB color packed 0xAARRGGBB
typedef StgModel*(*) Stg::stg_creator_t(StgWorld *, StgModel *) |
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 int(*) Stg::stg_line3d_func_t(int32_t x, int32_t y, int32_t z, void *arg) |
matching function should return 0 iff the candidate block is acceptable
typedef double Stg::stg_meters_t |
Metres: floating point unit of distance
typedef int(*) Stg::stg_model_callback_t(StgModel *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 unsigned long Stg::stg_msec_t |
Milliseconds: unit of (short) time
typedef double Stg::stg_radians_t |
Radians: unit of angle
typedef struct timeval Stg::stg_time_t |
time structure
typedef uint64_t Stg::stg_usec_t |
Microseconds: unit of (very short) time
typedef stg_pose_t Stg::stg_velocity_t |
specify a 3 axis velocity in x, y and heading.
typedef double Stg::stg_watts_t |
Watts: unit of power (energy/time)
Enumeration Type Documentation
anonymous enum |
any integer value other than this is a valid fiducial ID
Describe the image format used for saving screenshots
Create unique identifying numbers for each type of model, and a count of the number of types.
Define a position control method
Define a driving method
Define a localization method
Function Documentation
double Stg::dtor | ( | double | d | ) | [inline] |
convert an angle in degrees to radians
void Stg::gl_draw_string | ( | float | x, | |
float | y, | |||
float | z, | |||
const char * | string | |||
) |
Render a string at [x,y,z] in the current color
void Stg::Init | ( | int * | argc, | |
char ** | argv[] | |||
) |
Initialize the Stage library
bool Stg::InitDone | ( | ) |
returns true iff Stg::Init() has been called.
stg_pose_t Stg::new_pose | ( | stg_meters_t | x, | |
stg_meters_t | y, | |||
stg_meters_t | z, | |||
stg_radians_t | a | |||
) |
return a stg_pose_t with its fields initialized by the parameters
double Stg::normalize | ( | double | a | ) | [inline] |
Normalize an angle to within +/_ M_PI
stg_pose_t Stg::pose_sum | ( | stg_pose_t | p1, | |
stg_pose_t | p2 | |||
) |
returns the sum of [p1] + [p2], in [p1]'s coordinate system
stg_pose_t Stg::random_pose | ( | stg_meters_t | xmin, | |
stg_meters_t | xmax, | |||
stg_meters_t | ymin, | |||
stg_meters_t | ymax | |||
) |
return a random pose within the bounding rectangle, with z=0 and angle random
double Stg::rtod | ( | double | r | ) | [inline] |
convert an angle in radians to degrees
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
stg_color_t Stg::stg_color_pack | ( | double | r, | |
double | g, | |||
double | b, | |||
double | a | |||
) |
Specify a color from its components
void Stg::stg_color_unpack | ( | stg_color_t | col, | |
double * | r, | |||
double * | g, | |||
double * | b, | |||
double * | a | |||
) |
Obtain the components of a color
int Stg::stg_line_3d | ( | int32_t | x, | |
int32_t | y, | |||
int32_t | z, | |||
int32_t | dx, | |||
int32_t | dy, | |||
int32_t | dz, | |||
stg_line3d_func_t | visit_voxel, | |||
void * | arg | |||
) |
Visit every voxel along a vector from (x,y,z) to (x+dx, y+dy, z+dz). Call the function for every voxel, passing in the current voxel coordinates followed by the two arguments. Adapted from Graphics Gems IV, algorithm by Cohen & Kaufman 1991
stg_color_t Stg::stg_lookup_color | ( | const char * | name | ) |
Look up the color in the X11 database. (i.e. transform color name to color value). If the color is not found in the database, a bright red color (0xF00) will be returned instead.
stg_point_t * Stg::stg_points_create | ( | size_t | count | ) |
Create an array of [count] points. Caller must free the returned pointer, preferably with stg_points_destroy().
void Stg::stg_points_destroy | ( | stg_point_t * | pts | ) |
frees a point array
int Stg::stg_polygon_3d | ( | stg_point_int_t * | pts, | |
unsigned int | pt_count, | |||
stg_line3d_func_t | visit_voxel, | |||
void * | arg | |||
) |
Visit every voxel along a polygon defined by the array of points. Calls stg_line_3d().
void Stg::stg_pose_sum | ( | stg_pose_t * | result, | |
stg_pose_t * | p1, | |||
stg_pose_t * | p2 | |||
) |
calculate the sum of [p1] and [p2], in [p1]'s coordinate system, and copy the result into result.
void Stg::stg_print_err | ( | const char * | err | ) |
Report an error, with a standard, friendly message header
void Stg::stg_print_geom | ( | stg_geom_t * | geom | ) |
Print human-readable geometry on stdout
void Stg::stg_print_pose | ( | stg_pose_t * | pose | ) |
Print human-readable pose on stdout
void Stg::stg_print_velocity | ( | stg_velocity_t * | vel | ) |
Print human-readable velocity on stdout
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].
void Stg::stg_rotrects_normalize | ( | stg_rotrect_t * | rects, | |
int | num | |||
) |
normalizes the set [rects] of [num] rectangles, so that they fit exactly in a unit square.
stg_point_t * Stg::stg_unit_square_points_create | ( | ) |
create an array of 4 points containing the corners of a unit square.
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."
const double Stg::billion = 1e9 |
Convenient constant
const char Stg::COPYRIGHT[] |
Initial value:
"Copyright Richard Vaughan and contributors 2000-2008"
const char Stg::DESCRIPTION[] |
Initial value:
"Robot simulation library\nPart of the Player Project"
const char Stg::LICENSE[] |
Initial value:
"Stage robot simulation library\n" "Copyright (C) 2000-2008 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"
const double Stg::million = 1e6 |
Convenient constant
const double Stg::thousand = 1e3 |
Convenient constant
const uint32_t Stg::TOKEN_MAX = 64 |
The maximum length of a Stage model identifier string
stg_typetable_entry_t Stg::typetable |
a global (to the namespace) table mapping names to model types
Generated on Wed Jul 30 11:36:06 2008 for Stage by 1.4.7