stage.h File Reference


Detailed Description

Stage library header file

This header file contains the external interface for the Stage library

#include <unistd.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/time.h>
#include <glib.h>

Go to the source code of this file.


Data Structures

struct  stg_blobfinder_blob_t
struct  stg_blobfinder_config_t
struct  stg_bounds_t
struct  stg_bumper_config_t
struct  stg_bumper_sample_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_gripper_cmd_t
struct  stg_gripper_config_t
struct  stg_gripper_data_t
struct  stg_laser_config_t
struct  stg_laser_sample_t
struct  stg_point_t
struct  stg_polygon_t
struct  stg_polyline_t
struct  stg_pose_t
struct  stg_position_cfg_t
struct  stg_position_cmd_t
struct  stg_position_data_t
struct  stg_ptz_config_t
struct  stg_ptz_t
struct  stg_ranger_config_t
struct  stg_ranger_sample_t
struct  stg_size_t
struct  stg_speech_cmd_t
struct  stg_speech_config_t
struct  stg_speech_data_t
struct  stg_wifi_config_t
struct  stg_wifi_data_t

Defines

#define BILLION   1e9
#define DTOR(d)   ((d) * M_PI / 180.0)
#define EQ(A, B)   ((lrint(A*PRECISION))==(lrint(B*PRECISION)))
#define FALSE   0
#define FiducialNone   0
#define GT(A, B)   ((lrint(A*PRECISION))>(lrint(B*PRECISION)))
#define GTE(A, B)   ((lrint(A*PRECISION))>=(lrint(B*PRECISION)))
#define LT(A, B)   ((lrint(A*PRECISION))<(lrint(B*PRECISION)))
#define LTE(A, B)   ((lrint(A*PRECISION))<=(lrint(B*PRECISION)))
#define M_PI   3.14159265358979323846
#define MILLION   1e6
#define NORMALIZE(z)   atan2(sin(z), cos(z))
#define PRECISION   100000.0
#define PRINT_DEBUG(m)
#define PRINT_DEBUG1(m, a)
#define PRINT_DEBUG2(m, a, b)
#define PRINT_DEBUG3(m, a, b, c)
#define PRINT_DEBUG4(m, a, b, c, d)
#define PRINT_DEBUG5(m, a, b, c, d, e)
#define PRINT_ERR(m)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", __FILE__, __FUNCTION__)
#define PRINT_ERR1(m, a)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, __FILE__, __FUNCTION__)
#define PRINT_ERR2(m, a, b)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, __FILE__, __FUNCTION__)
#define PRINT_ERR3(m, a, b, c)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
#define PRINT_ERR4(m, a, b, c, d)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
#define PRINT_ERR5(m, a, b, c, d, e)   fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
#define PRINT_MSG(m)   printf( "Stage: "m"\n" )
#define PRINT_MSG1(m, a)   printf( "Stage: "m"\n", a)
#define PRINT_MSG2(m, a, b)   printf( "Stage: "m"\n,", a, b )
#define PRINT_MSG3(m, a, b, c)   printf( "Stage: "m"\n", a, b, c )
#define PRINT_MSG4(m, a, b, c, d)   printf( "Stage: "m"\n", a, b, c, d )
#define PRINT_MSG5(m, a, b, c, d, e)   printf( "Stage: "m"\n", a, b, c, d, e )
#define PRINT_WARN(m)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", __FILE__, __FUNCTION__)
#define PRINT_WARN1(m, a)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, __FILE__, __FUNCTION__)
#define PRINT_WARN2(m, a, b)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, __FILE__, __FUNCTION__)
#define PRINT_WARN3(m, a, b, c)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, __FILE__, __FUNCTION__)
#define PRINT_WARN4(m, a, b, c, d)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__)
#define PRINT_WARN5(m, a, b, c, d, e)   printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__)
#define RTOD(r)   ((r) * 180.0 / M_PI)
#define STG_BLOB_CHANNELS_MAX   16
#define STG_MOVE_ROT   (1 << 1)
#define STG_MOVE_SCALE   (1 << 2)
#define STG_MOVE_TRANS   (1 << 0)
#define STG_POSITION_CONTROL_DEFAULT   STG_POSITION_CONTROL_VELOCITY
#define STG_POSITION_DRIVE_DEFAULT   STG_POSITION_DRIVE_DIFFERENTIAL
#define STG_POSITION_LOCALIZATION_DEFAULT   STG_POSITION_LOCALIZATION_GPS
#define STG_SPEECH_MAX_STRING_LEN   256
#define STG_TOKEN_MAX   64
#define TRUE   1
#define TWOPI   (2.0*M_PI)

Typedefs

typedef int stg_bool_t
typedef uint32_t stg_color_t
typedef int stg_id_t
typedef double stg_joules_t
typedef double stg_kg_t
typedef double stg_meters_t
typedef int(* stg_model_callback_t )(stg_model_t *mod, void *user)
typedef int(* stg_model_initializer_t )(stg_model_t *)
typedef _stg_model stg_model_t
typedef int stg_movemask_t
typedef unsigned long stg_msec_t
typedef stg_ptz_t stg_ptz_cmd_t
typedef stg_ptz_t stg_ptz_data_t
typedef double stg_radians_t
typedef stg_pose_t stg_velocity_t
typedef double stg_watts_t
typedef _stg_world stg_world_t

Enumerations

enum  stg_gripper_cmd_type_t {
  STG_GRIPPER_CMD_NOP = 0, STG_GRIPPER_CMD_OPEN, STG_GRIPPER_CMD_CLOSE, STG_GRIPPER_CMD_UP,
  STG_GRIPPER_CMD_DOWN
}
enum  stg_gripper_lift_state_t { STG_GRIPPER_LIFT_DOWN = 0, STG_GRIPPER_LIFT_UP, STG_GRIPPER_LIFT_UPPING, STG_GRIPPER_LIFT_DOWNING }
enum  stg_gripper_paddle_state_t { STG_GRIPPER_PADDLE_OPEN = 0, STG_GRIPPER_PADDLE_CLOSED, STG_GRIPPER_PADDLE_OPENING, STG_GRIPPER_PADDLE_CLOSING }
enum  stg_laser_return_t { LaserTransparent, LaserVisible, LaserBright }
enum  stg_position_control_mode_t { STG_POSITION_CONTROL_VELOCITY, STG_POSITION_CONTROL_POSITION, STG_POSITION_CONTROL_VELOCITY_HEADING }
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 }
enum  stg_speech_cmd_type_t { STG_SPEECH_CMD_NOP = 0, STG_SPEECH_CMD_SAY }

Functions

int stg_init (int argc, char **argv)
stg_color_t stg_lookup_color (const char *name)
void stg_model_add_callback (stg_model_t *mod, void *member, stg_model_callback_t cb, void *user)
void stg_model_add_property_toggles (stg_model_t *mod, void *member, stg_model_callback_t callback_on, void *arg_on, stg_model_callback_t callback_off, void *arg_off, const char *name, const char *label, gboolean enabled)
GPtrArray * stg_model_array_from_tree (stg_model_t *root)
stg_model_tstg_model_create (stg_world_t *world, stg_model_t *parent, stg_id_t id, char *typestr)
void stg_model_destroy (stg_model_t *mod)
int stg_model_fig_clear_cb (stg_model_t *mod, void *data, size_t len, void *userp)
void * stg_model_get_cfg (stg_model_t *mod, size_t *lenp)
void * stg_model_get_cmd (stg_model_t *mod, size_t *lenp)
void * stg_model_get_data (stg_model_t *mod, size_t *lenp)
void stg_model_get_geom (stg_model_t *mod, stg_geom_t *dest)
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)
stg_polygon_tstg_model_get_polygons (stg_model_t *mod, size_t *poly_count)
void stg_model_get_pose (stg_model_t *mod, stg_pose_t *dest)
void stg_model_get_velocity (stg_model_t *mod, stg_velocity_t *dest)
void stg_model_global_to_local (stg_model_t *mod, stg_pose_t *pose)
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)
void stg_model_load (stg_model_t *mod)
void stg_model_local_to_global (stg_model_t *mod, stg_pose_t *pose)
void stg_model_position_set_odom (stg_model_t *mod, stg_pose_t *odom)
void stg_model_print (stg_model_t *mod, char *prefix)
int stg_model_remove_callback (stg_model_t *mod, void *member, stg_model_callback_t callback)
stg_model_tstg_model_root (stg_model_t *mod)
void stg_model_save (stg_model_t *mod)
void stg_model_set_blob_return (stg_model_t *mod, int val)
void stg_model_set_boundary (stg_model_t *mod, int val)
void stg_model_set_cfg (stg_model_t *mod, void *cfg, size_t len)
void stg_model_set_cmd (stg_model_t *mod, void *cmd, size_t len)
void stg_model_set_color (stg_model_t *mod, stg_color_t col)
void stg_model_set_data (stg_model_t *mod, void *data, size_t len)
void stg_model_set_fiducial_key (stg_model_t *mod, int key)
void stg_model_set_fiducial_return (stg_model_t *mod, int fid)
void stg_model_set_geom (stg_model_t *mod, stg_geom_t *src)
void stg_model_set_global_pose (stg_model_t *mod, stg_pose_t *gpose)
void stg_model_set_global_velocity (stg_model_t *mod, stg_velocity_t *gvel)
void stg_model_set_gripper_return (stg_model_t *mod, int val)
void stg_model_set_gui_grid (stg_model_t *mod, int val)
void stg_model_set_gui_mask (stg_model_t *mod, int val)
void stg_model_set_gui_nose (stg_model_t *mod, int val)
void stg_model_set_gui_outline (stg_model_t *mod, int val)
void stg_model_set_laser_return (stg_model_t *mod, int val)
void stg_model_set_lines (stg_model_t *mod, stg_polyline_t *lines, size_t lines_count)
void stg_model_set_map_resolution (stg_model_t *mod, stg_meters_t res)
void stg_model_set_mass (stg_model_t *mod, stg_kg_t mass)
int stg_model_set_named_property_double (stg_model_t *mod, char *name, size_t len, double value)
int stg_model_set_named_property_int (stg_model_t *mod, char *name, size_t len, int value)
void stg_model_set_obstacle_return (stg_model_t *mod, int val)
int stg_model_set_parent (stg_model_t *mod, stg_model_t *newparent)
void stg_model_set_polygons (stg_model_t *mod, stg_polygon_t *polys, size_t poly_count)
void stg_model_set_pose (stg_model_t *mod, stg_pose_t *pose)
void stg_model_set_ranger_return (stg_model_t *mod, int val)
void stg_model_set_stall (stg_model_t *mod, stg_bool_t stall)
void stg_model_set_velocity (stg_model_t *mod, stg_velocity_t *vel)
void stg_model_set_watts (stg_model_t *mod, stg_watts_t watts)
int stg_model_shutdown (stg_model_t *mod)
int stg_model_startup (stg_model_t *mod)
void stg_model_subscribe (stg_model_t *mod)
void stg_model_unsubscribe (stg_model_t *mod)
int stg_model_update (stg_model_t *model)
stg_point_tstg_points_create (size_t count)
void stg_points_destroy (stg_point_t *pts)
void stg_polygon_append_points (stg_polygon_t *poly, stg_point_t *pts, size_t count)
void stg_polygon_print (stg_polygon_t *poly)
void stg_polygon_set_points (stg_polygon_t *poly, stg_point_t *pts, size_t count)
stg_polygon_tstg_polygons_create (int count)
void stg_polygons_destroy (stg_polygon_t *p, size_t count)
stg_polygon_tstg_polygons_from_image_file (const char *filename, size_t *poly_count)
void stg_polygons_normalize (stg_polygon_t *polys, int num, double width, double height)
void stg_polygons_print (stg_polygon_t *polys, unsigned int count)
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_gripper_config (stg_gripper_config_t *slc)
void stg_print_laser_config (stg_laser_config_t *slc)
void stg_print_pose (stg_pose_t *pose)
void stg_print_velocity (stg_velocity_t *vel)
void stg_quit_request (void)
int stg_quit_test (void)
stg_msec_t stg_timenow (void)
stg_polygon_tstg_unit_polygon_create (void)
const char * stg_version_string (void)
stg_world_tstg_world_create (stg_id_t id, const char *token, int sim_interval, int real_interval, double ppm, double width, double height)
stg_world_tstg_world_create_from_file (const char *worldfile_path)
void stg_world_destroy (stg_world_t *world)
stg_model_tstg_world_get_model (stg_world_t *world, stg_id_t mid)
void stg_world_load (stg_world_t *mod)
stg_model_tstg_world_model_name_lookup (stg_world_t *world, const char *name)
void stg_world_print (stg_world_t *world)
void stg_world_save (stg_world_t *mod)
void stg_world_set_interval_real (stg_world_t *world, unsigned int val)
void stg_world_set_interval_sim (stg_world_t *world, unsigned int val)
void stg_world_start (stg_world_t *world)
void stg_world_stop (stg_world_t *world)
int stg_world_update (stg_world_t *world, int sleepflag)

Generated on Thu Dec 13 14:35:18 2007 for Stage by  doxygen 1.4.6