[libstage API reference]

Detailed Description

Various useful macros and functions that don't belong anywhere else.


 Floating point comparisons


#define BILLION   1e9
#define DTOR(d)   ((d) * M_PI / 180.0)
#define FALSE   0
#define M_PI   3.14159265358979323846
#define MILLION   1e6
#define NORMALIZE(z)   atan2(sin(z), cos(z))
#define RTOD(r)   ((r) * 180.0 / M_PI)
#define TRUE   1
#define TWOPI   (2.0*M_PI)


stg_color_t stg_lookup_color (const char *name)
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)

Define Documentation

#define BILLION   1e9

#define DTOR  )     ((d) * M_PI / 180.0)

Convert degrees to radians.

#define FALSE   0

#define M_PI   3.14159265358979323846

#define MILLION   1e6

#define NORMALIZE  )     atan2(sin(z), cos(z))

Normalize angle to domain -pi, pi.

#define RTOD  )     ((r) * 180.0 / M_PI)

Convert radians to degrees.

#define TRUE   1

#define TWOPI   (2.0*M_PI)

Function Documentation

stg_color_t 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.

void 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_print_err const char *  err  ) 

Report an error, with a standard, friendly message header

void stg_print_geom stg_geom_t geom  ) 

Print human-readable geometry on stdout

void stg_print_gripper_config stg_gripper_config_t slc  ) 

Print human-readable version of the gripper config struct

void stg_print_laser_config stg_laser_config_t slc  ) 

Print human-readable version of the laser config struct

void stg_print_pose stg_pose_t pose  ) 

Print human-readable pose on stdout

void stg_print_velocity stg_velocity_t vel  ) 

Print human-readable velocity on stdout

Generated on Thu Dec 13 13:55:22 2007 for Stage by  doxygen 1.4.6