Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Basic model
[Modelslibstage]


Data Structures

struct  stg_size_t
struct  stg_pose_t
struct  stg_geom_t
struct  stg_energy_data_t
struct  stg_energy_config_t
struct  stg_guifeatures_t
struct  stg_cbarg_t
struct  stg_property

Defines

#define FiducialNone   0
#define RangecomNone   0
#define RangecomImpede   1
#define RangecomPoint   2
#define STG_MOVE_TRANS   (1 << 0)
#define STG_MOVE_ROT   (1 << 1)
#define STG_MOVE_SCALE   (1 << 2)
#define STG_PROPNAME_MAX   128

Typedefs

typedef int stg_id_t
typedef double stg_meters_t
typedef double stg_radians_t
typedef unsigned long stg_msec_t
typedef double stg_kg_t
typedef double stg_joules_t
typedef double stg_watts_t
typedef int stg_bool_t
typedef double stg_friction_t
typedef uint32_t stg_color_t
typedef int stg_obstacle_return_t
typedef int stg_blob_return_t
typedef int stg_fiducial_return_t
typedef int stg_rangecom_return_t
typedef int stg_ranger_return_t
typedef stg_pose_t stg_velocity_t
typedef int stg_movemask_t
typedef _stg_model stg_model_t
typedef stg_property stg_property_t
typedef int(* stg_model_initializer_t )(stg_model_t *)

Enumerations

enum  stg_gripper_return_t { STG_GRIP_NO = 0, STG_GRIP_YES }
enum  stg_laser_return_t { LaserTransparent, LaserVisible, LaserBright }

Functions

stg_model_tstg_model_create (stg_world_t *world, stg_model_t *parent, stg_id_t id, char *token, stg_model_initializer_t initializer)
void stg_model_destroy (stg_model_t *mod)
void stg_model_get_global_pose (stg_model_t *mod, stg_pose_t *pose)
void stg_model_get_global_velocity (stg_model_t *mod, stg_velocity_t *gvel)
void stg_model_subscribe (stg_model_t *mod)
void stg_model_unsubscribe (stg_model_t *mod)
void stg_model_load (stg_model_t *mod)
void stg_model_save (stg_model_t *mod)
int stg_model_set_global_pose (stg_model_t *mod, stg_pose_t *gpose)
int stg_model_set_velocity (stg_model_t *mod, stg_velocity_t *vel)
void stg_model_lock (stg_model_t *mod)
void stg_model_unlock (stg_model_t *mod)
int stg_model_set_parent (stg_model_t *mod, stg_model_t *newparent)
void stg_model_get_geom (stg_model_t *mod, stg_geom_t *dest)
void stg_model_get_velocity (stg_model_t *mod, stg_velocity_t *dest)
stg_property_tstg_model_set_property (stg_model_t *mod, const char *prop, void *data, size_t len)
stg_property_tstg_model_set_property_ex (stg_model_t *mod, const char *prop, void *data, size_t len, stg_property_storage_func_t func)
void * stg_model_get_property (stg_model_t *mod, const char *prop, size_t *len)
void * stg_model_get_property_fixed (stg_model_t *mod, const char *name, size_t size)
void stg_model_property_refresh (stg_model_t *mod, const char *propname)
stg_polygon_tstg_model_get_polygons (stg_model_t *mod, size_t *poly_count)
void stg_model_set_polygons (stg_model_t *mod, stg_polygon_t *polys, size_t poly_count)
int stg_model_add_property_callback (stg_model_t *mod, const char *prop, stg_property_callback_t, void *user)
int stg_model_remove_property_callback (stg_model_t *mod, const char *prop, stg_property_callback_t)
int stg_model_remove_property_callbacks (stg_model_t *mod, const char *prop)
void stg_model_print (stg_model_t *mod)
int stg_model_is_antecedent (stg_model_t *mod, stg_model_t *testmod)
int stg_model_is_descendent (stg_model_t *mod, stg_model_t *testmod)
int stg_model_is_related (stg_model_t *mod1, stg_model_t *mod2)
stg_model_tstg_model_root (stg_model_t *mod)
int stg_model_tree_to_ptr_array (stg_model_t *root, GPtrArray *array)
int stg_model_startup (stg_model_t *mod)
int stg_model_shutdown (stg_model_t *mod)
int stg_model_update (stg_model_t *model)
void stg_model_global_to_local (stg_model_t *mod, stg_pose_t *pose)
void stg_model_local_to_global (stg_model_t *mod, stg_pose_t *pose)

Detailed Description

Implements the basic object

Define Documentation

#define FiducialNone   0
 

any integer value other than this is a valid fiducial ID

#define RangecomNone   0
 

mjanssen - these values are used for RangeCom

#define RangecomImpede   1
 

#define RangecomPoint   2
 

#define STG_MOVE_TRANS   (1 << 0)
 

#define STG_MOVE_ROT   (1 << 1)
 

#define STG_MOVE_SCALE   (1 << 2)
 

#define STG_PROPNAME_MAX   128
 


Typedef Documentation

typedef int stg_id_t
 

typedef double stg_meters_t
 

typedef double stg_radians_t
 

typedef unsigned long stg_msec_t
 

typedef double stg_kg_t
 

typedef double stg_joules_t
 

typedef double stg_watts_t
 

typedef int stg_bool_t
 

typedef double stg_friction_t
 

typedef uint32_t stg_color_t
 

typedef int stg_obstacle_return_t
 

typedef int stg_blob_return_t
 

typedef int stg_fiducial_return_t
 

typedef int stg_rangecom_return_t
 

typedef int stg_ranger_return_t
 

typedef stg_pose_t stg_velocity_t
 

specify a 3 axis velocity in x, y and heading.

typedef int stg_movemask_t
 

typedef struct _stg_model stg_model_t
 

opaque data structure implementing a model

typedef struct stg_property stg_property_t
 

typedef int(* stg_model_initializer_t)(stg_model_t *)
 


Enumeration Type Documentation

enum stg_gripper_return_t
 

Enumerator:
STG_GRIP_NO 
STG_GRIP_YES 

enum stg_laser_return_t
 

laser return value

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


Function Documentation

stg_model_t* stg_model_create stg_world_t world,
stg_model_t parent,
stg_id_t  id,
char *  token,
stg_model_initializer_t  initializer
 

create a new model

void stg_model_destroy stg_model_t mod  ) 
 

destroy a model, freeing its memory

void stg_model_get_global_pose stg_model_t mod,
stg_pose_t pose
 

get the pose of a model in the global CS

void stg_model_get_global_velocity stg_model_t mod,
stg_velocity_t gvel
 

get the velocity of a model in the global CS

void stg_model_subscribe stg_model_t mod  ) 
 

subscribe to a model's data

void stg_model_unsubscribe stg_model_t mod  ) 
 

unsubscribe from a model's data

void stg_model_load stg_model_t mod  ) 
 

configure a model by reading from the current world file

void stg_model_save stg_model_t mod  ) 
 

save the state of the model to the current world file

int stg_model_set_global_pose stg_model_t mod,
stg_pose_t gpose
 

set the pose of model in global coordinates

int stg_model_set_velocity stg_model_t mod,
stg_velocity_t vel
 

set a model's velocity in it's parent's coordinate system

void stg_model_lock stg_model_t mod  ) 
 

Get exclusive access to a model, for threaded applications. Release with stg_model_unlock().

void stg_model_unlock stg_model_t mod  ) 
 

Release exclusive access to a model, obtained with stg_model_lock()

int stg_model_set_parent stg_model_t mod,
stg_model_t newparent
 

Change a model's parent - experimental

void stg_model_get_geom stg_model_t mod,
stg_geom_t dest
 

void stg_model_get_velocity stg_model_t mod,
stg_velocity_t dest
 

stg_property_t* stg_model_set_property stg_model_t mod,
const char *  prop,
void *  data,
size_t  len
 

stg_property_t* stg_model_set_property_ex stg_model_t mod,
const char *  prop,
void *  data,
size_t  len,
stg_property_storage_func_t  func
 

void* stg_model_get_property stg_model_t mod,
const char *  prop,
size_t *  len
 

gets the named property data. if len is non-NULL, it is set with the size of the data in bytes

void* stg_model_get_property_fixed stg_model_t mod,
const char *  name,
size_t  size
 

gets a property of a known size. Fail assertion if the size isn't right.

void stg_model_property_refresh stg_model_t mod,
const char *  propname
 

stg_polygon_t* stg_model_get_polygons stg_model_t mod,
size_t *  poly_count
 

gets a model's "polygons" property and fills poly_count with the number of polygons to be found

void stg_model_set_polygons stg_model_t mod,
stg_polygon_t polys,
size_t  poly_count
 

int stg_model_add_property_callback stg_model_t mod,
const char *  prop,
stg_property_callback_t  ,
void *  user
 

int stg_model_remove_property_callback stg_model_t mod,
const char *  prop,
stg_property_callback_t 
 

int stg_model_remove_property_callbacks stg_model_t mod,
const char *  prop
 

void stg_model_print stg_model_t mod  ) 
 

print human-readable information about the model on stdout

int stg_model_is_antecedent stg_model_t mod,
stg_model_t testmod
 

returns TRUE iff [testmod] exists above [mod] in a model tree

int stg_model_is_descendent stg_model_t mod,
stg_model_t testmod
 

returns TRUE iff [testmod] exists below [mod] in a model tree

int stg_model_is_related stg_model_t mod1,
stg_model_t mod2
 

returns TRUE iff [mod1] and [mod2] both exist in the same model tree

stg_model_t* stg_model_root stg_model_t mod  ) 
 

return the top-level model above mod

int stg_model_tree_to_ptr_array stg_model_t root,
GPtrArray *  array
 

add a pointer to each model in the tree starting at root to the array. Returns the number of model pointers added

int stg_model_startup stg_model_t mod  ) 
 

initialize a model - called when a model goes from zero to one subscriptions

int stg_model_shutdown stg_model_t mod  ) 
 

finalize a model - called when a model goes from one to zero subscriptions

int stg_model_update stg_model_t model  ) 
 

void stg_model_global_to_local stg_model_t mod,
stg_pose_t pose
 

convert a global pose into the model's local coordinate system

void stg_model_local_to_global stg_model_t mod,
stg_pose_t pose
 


Generated on Thu Aug 4 13:08:48 2005 for Stage by  doxygen 1.4.3-20050530