Mailing lists


Old news
Old stuff

playerc.h File Reference

#include <stdio.h>
#include "player.h"

Go to the source code of this file.


struct  playerc_client_item_t
struct  playerc_mclient_t
struct  playerc_device_info_t
 Info about an available (but not necessarily subscribed) device. More...

struct  _playerc_client_t
 Client object data. More...

struct  _playerc_device_t
 Common device info. More...

struct  playerc_blobfinder_blob_t
 Description of a single blob. More...

struct  playerc_blobfinder_t
 Blobfinder device data. More...

struct  playerc_bumper_t
 Bumper proxy data. More...

struct  playerc_camera_t
 Camera proxy data. More...

struct  playerc_fiducial_item_t
 Description for a single fiducial. More...

struct  playerc_fiducial_t
 Fiducial finder data. More...

struct  playerc_gps_t
 GPS proxy data. More...

struct  playerc_ir_t
 Ir proxy data. More...

struct  playerc_joystick_t
 Joystick device data. More...

struct  playerc_laser_t
 Laser proxy data. More...

struct  playerc_localize_hypoth_t
 Hypothesis data. More...

struct  playerc_localize_particle
struct  playerc_localize_t
 Localization device data. More...

struct  playerc_log_t
 Log proxy data. More...

struct  playerc_map_t
 Map proxy data. More...

struct  playerc_motor_t
 Motor device data. More...

struct  playerc_planner_t
 Planner device data. More...

struct  playerc_position_t
 Position device data. More...

struct  playerc_position2d_t
struct  playerc_position3d_t
struct  playerc_power_t
 Power device data. More...

struct  playerc_ptz_t
 PTZ device data. More...

struct  playerc_sonar_t
 Sonar proxy data. More...

struct  playerc_truth_t
 Truth proxy data. More...

struct  playerc_wifi_link_t
 Individual link info. More...

struct  playerc_wifi_t
 Wifi device proxy. More...

struct  playerc_simulation_t
 Simulation device proxy. More...

struct  playerc_gripper_t
 Gripper device data. More...

struct  playerc_dio_t
struct  playerc_speech_t


#define MIN(a, b)   ((a < b) ? a : b)
#define MAX(a, b)   ((a > b) ? a : b)
#define PLAYERC_MAP_INDEX(dev, i, j)   ((dev->width) * (j) + (i))
 Convert from a cell position to a map index.


typedef void(* playerc_putdata_fn_t )(void *device, char *header, char *data, size_t len)
 Typedef for proxy callback function.

typedef void(* playerc_callback_fn_t )(void *data)
 Typedef for proxy callback function.

typedef _playerc_client_t playerc_client_t
 Client object data.

typedef _playerc_device_t playerc_device_t
 Common device info.

typedef playerc_localize_particle playerc_localize_particle_t


const char * playerc_error_str (void)
const char * playerc_lookup_name (int code)
int playerc_lookup_code (const char *name)
playerc_mclient_tplayerc_mclient_create (void)
void playerc_mclient_destroy (playerc_mclient_t *mclient)
int playerc_mclient_addclient (playerc_mclient_t *mclient, struct _playerc_client_t *client)
int playerc_mclient_peek (playerc_mclient_t *mclient, int timeout)
int playerc_mclient_read (playerc_mclient_t *mclient, int timeout)
playerc_client_tplayerc_client_create (playerc_mclient_t *mclient, const char *host, int port)
 Create a client object.

void playerc_client_destroy (playerc_client_t *client)
 Destroy a client object.

int playerc_client_connect (playerc_client_t *client)
 Connect to the server.

int playerc_client_disconnect (playerc_client_t *client)
 Disconnect from the server.

int playerc_client_datamode (playerc_client_t *client, int mode)
 Change the server's data delivery mode.

int playerc_client_requestdata (playerc_client_t *client)
 Request a round of data.

int playerc_client_datafreq (playerc_client_t *client, int freq)
 Change the server's data delivery frequency.

int playerc_client_adddevice (playerc_client_t *client, struct _playerc_device_t *device)
 Add a device proxy.

int playerc_client_deldevice (playerc_client_t *client, struct _playerc_device_t *device)
 Remove a device proxy.

int playerc_client_addcallback (playerc_client_t *client, struct _playerc_device_t *device, playerc_callback_fn_t callback, void *data)
 Add user callbacks (called when new data arrives).

int playerc_client_delcallback (playerc_client_t *client, struct _playerc_device_t *device, playerc_callback_fn_t callback, void *data)
 Remove user callbacks (called when new data arrives).

int playerc_client_get_devlist (playerc_client_t *client)
 Get the list of available device ids.

int playerc_client_subscribe (playerc_client_t *client, int code, int index, int access, char *drivername, size_t len)
 Subscribe a device.

int playerc_client_unsubscribe (playerc_client_t *client, int code, int index)
 Unsubscribe a device.

int playerc_client_request (playerc_client_t *client, struct _playerc_device_t *device, void *req_data, int req_len, void *rep_data, int rep_len)
 Issue a request to the server and await a reply (blocking).

int playerc_client_peek (playerc_client_t *client, int timeout)
 Test to see if there is pending data.

void * playerc_client_read (playerc_client_t *client)
 Read data from the server (blocking).

int playerc_client_write (playerc_client_t *client, struct _playerc_device_t *device, void *cmd, int len)
 Write data to the server.

void playerc_device_init (playerc_device_t *device, playerc_client_t *client, int code, int index, playerc_putdata_fn_t putdata)
 Initialise the device.

void playerc_device_term (playerc_device_t *device)
 Finalize the device.

int playerc_device_subscribe (playerc_device_t *device, int access)
 Subscribe the device.

int playerc_device_unsubscribe (playerc_device_t *device)
 Unsubscribe the device.

playerc_blobfinder_tplayerc_blobfinder_create (playerc_client_t *client, int index)
 Create a blobfinder proxy.

void playerc_blobfinder_destroy (playerc_blobfinder_t *device)
 Destroy a blobfinder proxy.

int playerc_blobfinder_subscribe (playerc_blobfinder_t *device, int access)
 Subscribe to the blobfinder device.

int playerc_blobfinder_unsubscribe (playerc_blobfinder_t *device)
 Un-subscribe from the blobfinder device.

void playerc_blobfinder_putdata (playerc_blobfinder_t *device, player_msghdr_t *header, player_blobfinder_data_t *data, size_t len)
playerc_bumper_tplayerc_bumper_create (playerc_client_t *client, int index)
 Create a bumper proxy.

void playerc_bumper_destroy (playerc_bumper_t *device)
 Destroy a bumper proxy.

int playerc_bumper_subscribe (playerc_bumper_t *device, int access)
 Subscribe to the bumper device.

int playerc_bumper_unsubscribe (playerc_bumper_t *device)
 Un-subscribe from the bumper device.

int playerc_bumper_get_geom (playerc_bumper_t *device)
 Get the bumper geometry.

playerc_camera_tplayerc_camera_create (playerc_client_t *client, int index)
 Create a camera proxy.

void playerc_camera_destroy (playerc_camera_t *device)
 Destroy a camera proxy.

int playerc_camera_subscribe (playerc_camera_t *device, int access)
 Subscribe to the camera device.

int playerc_camera_unsubscribe (playerc_camera_t *device)
 Un-subscribe from the camera device.

void playerc_camera_decompress (playerc_camera_t *device)
 Decompress the image (modifies the current proxy data).

playerc_fiducial_tplayerc_fiducial_create (playerc_client_t *client, int index)
 Create a fiducial proxy.

void playerc_fiducial_destroy (playerc_fiducial_t *device)
 Destroy a fiducial proxy.

int playerc_fiducial_subscribe (playerc_fiducial_t *device, int access)
 Subscribe to the fiducial device.

int playerc_fiducial_unsubscribe (playerc_fiducial_t *device)
 Un-subscribe from the fiducial device.

int playerc_fiducial_get_geom (playerc_fiducial_t *device)
 Get the fiducial geometry.

playerc_gps_tplayerc_gps_create (playerc_client_t *client, int index)
 Create a gps proxy.

void playerc_gps_destroy (playerc_gps_t *device)
 Destroy a gps proxy.

int playerc_gps_subscribe (playerc_gps_t *device, int access)
 Subscribe to the gps device.

int playerc_gps_unsubscribe (playerc_gps_t *device)
 Un-subscribe from the gps device.

playerc_ir_tplayerc_ir_create (playerc_client_t *client, int index)
 Create a ir proxy.

void playerc_ir_destroy (playerc_ir_t *device)
 Destroy a ir proxy.

int playerc_ir_subscribe (playerc_ir_t *device, int access)
 Subscribe to the ir device.

int playerc_ir_unsubscribe (playerc_ir_t *device)
 Un-subscribe from the ir device.

int playerc_ir_get_geom (playerc_ir_t *device)
 Get the ir geometry.

playerc_joystick_tplayerc_joystick_create (playerc_client_t *client, int index)
 Create a joystick device proxy.

void playerc_joystick_destroy (playerc_joystick_t *device)
 Destroy a joystick device proxy.

int playerc_joystick_subscribe (playerc_joystick_t *device, int access)
 Subscribe to the joystick device.

int playerc_joystick_unsubscribe (playerc_joystick_t *device)
 Un-subscribe from the joystick device.

void playerc_joystick_putdata (playerc_joystick_t *device, player_msghdr_t *header, player_joystick_data_t *data, size_t len)
playerc_laser_tplayerc_laser_create (playerc_client_t *client, int index)
 Create a laser proxy.

void playerc_laser_destroy (playerc_laser_t *device)
 Destroy a laser proxy.

int playerc_laser_subscribe (playerc_laser_t *device, int access)
 Subscribe to the laser device.

int playerc_laser_unsubscribe (playerc_laser_t *device)
 Un-subscribe from the laser device.

void playerc_laser_putdata (playerc_laser_t *device, player_msghdr_t *header, player_laser_data_t *data, size_t len)
int playerc_laser_set_config (playerc_laser_t *device, double min_angle, double max_angle, int resolution, int range_res, int intensity)
 Configure the laser.

int playerc_laser_get_config (playerc_laser_t *device, double *min_angle, double *max_angle, int *resolution, int *range_res, int *intensity)
 Get the laser configuration.

int playerc_laser_get_geom (playerc_laser_t *device)
 Get the laser geometry.

playerc_localize_tplayerc_localize_create (playerc_client_t *client, int index)
 Create a localize proxy.

void playerc_localize_destroy (playerc_localize_t *device)
 Destroy a localize proxy.

int playerc_localize_subscribe (playerc_localize_t *device, int access)
 Subscribe to the localize device.

int playerc_localize_unsubscribe (playerc_localize_t *device)
 Un-subscribe from the localize device.

int playerc_localize_set_pose (playerc_localize_t *device, double pose[3], double cov[3][3])
 Set the the robot pose (mean and covariance).

int playerc_localize_get_config (playerc_localize_t *device, player_localize_config_t *config)
 Get the current configuration.

int playerc_localize_set_config (playerc_localize_t *device, player_localize_config_t config)
 Modify the current configuration.

int playerc_localize_get_particles (playerc_localize_t *device)
playerc_log_tplayerc_log_create (playerc_client_t *client, int index)
 Create a log proxy.

void playerc_log_destroy (playerc_log_t *device)
 Destroy a log proxy.

int playerc_log_subscribe (playerc_log_t *device, int access)
 Subscribe to the log device.

int playerc_log_unsubscribe (playerc_log_t *device)
 Un-subscribe from the log device.

int playerc_log_set_write_state (playerc_log_t *device, int state)
 Start/stop logging.

int playerc_log_set_read_state (playerc_log_t *device, int state)
 Start/stop playback.

int playerc_log_set_read_rewind (playerc_log_t *device)
 Rewind playback.

int playerc_log_get_state (playerc_log_t *device)
 Get logging/playback state.

int playerc_log_set_filename (playerc_log_t *device, const char *fname)
 Change name of log file to write to.

playerc_map_tplayerc_map_create (playerc_client_t *client, int index)
 Create a map proxy.

void playerc_map_destroy (playerc_map_t *device)
 Destroy a map proxy.

int playerc_map_subscribe (playerc_map_t *device, int access)
 Subscribe to the map device.

int playerc_map_unsubscribe (playerc_map_t *device)
 Un-subscribe from the map device.

int playerc_map_get_map (playerc_map_t *device)
 Get the map, which is stored in the proxy.

playerc_motor_tplayerc_motor_create (playerc_client_t *client, int index)
 Create a motor device proxy.

void playerc_motor_destroy (playerc_motor_t *device)
 Destroy a motor device proxy.

int playerc_motor_subscribe (playerc_motor_t *device, int access)
 Subscribe to the motor device.

int playerc_motor_unsubscribe (playerc_motor_t *device)
 Un-subscribe from the motor device.

int playerc_motor_enable (playerc_motor_t *device, int enable)
 Enable/disable the motors.

int playerc_motor_position_control (playerc_motor_t *device, int type)
 Change position control.

int playerc_motor_set_cmd_vel (playerc_motor_t *device, double vt, int state)
 Set the target rotational velocity.

int playerc_motor_set_cmd_pose (playerc_motor_t *device, double gt, int state)
 Set the target pose.

playerc_planner_tplayerc_planner_create (playerc_client_t *client, int index)
 Create a planner device proxy.

void playerc_planner_destroy (playerc_planner_t *device)
 Destroy a planner device proxy.

int playerc_planner_subscribe (playerc_planner_t *device, int access)
 Subscribe to the planner device.

int playerc_planner_unsubscribe (playerc_planner_t *device)
 Un-subscribe from the planner device.

int playerc_planner_set_cmd_pose (playerc_planner_t *device, double gx, double gy, double ga)
 Set the goal pose (gx, gy, ga).

int playerc_planner_get_waypoints (playerc_planner_t *device)
 Get the list of waypoints.

int playerc_planner_enable (playerc_planner_t *device, int state)
 Enable / disable the robot's motion.

playerc_position_tplayerc_position_create (playerc_client_t *client, int index)
 Create a position device proxy.

void playerc_position_destroy (playerc_position_t *device)
 Destroy a position device proxy.

int playerc_position_subscribe (playerc_position_t *device, int access)
 Subscribe to the position device.

int playerc_position_unsubscribe (playerc_position_t *device)
 Un-subscribe from the position device.

void playerc_position_putdata (playerc_position_t *device, player_msghdr_t *header, player_position_data_t *data, size_t len)
int playerc_position_enable (playerc_position_t *device, int enable)
 Enable/disable the motors.

int playerc_position_get_geom (playerc_position_t *device)
 Get the position geometry.

int playerc_position_set_cmd_vel (playerc_position_t *device, double vx, double vy, double va, int state)
 Set the target speed.

int playerc_position_set_cmd_pose (playerc_position_t *device, double gx, double gy, double ga, int state)
 Set the target pose.

playerc_position2d_tplayerc_position2d_create (playerc_client_t *client, int index)
void playerc_position2d_destroy (playerc_position2d_t *device)
int playerc_position2d_subscribe (playerc_position2d_t *device, int access)
int playerc_position2d_unsubscribe (playerc_position2d_t *device)
int playerc_position2d_enable (playerc_position2d_t *device, int enable)
int playerc_position2d_get_geom (playerc_position2d_t *device)
int playerc_position2d_set_cmd_vel (playerc_position2d_t *device, double vx, double vy, double va, int state)
int playerc_position2d_set_cmd_pose (playerc_position2d_t *device, double gx, double gy, double ga, int state)
playerc_position3d_tplayerc_position3d_create (playerc_client_t *client, int index)
void playerc_position3d_destroy (playerc_position3d_t *device)
int playerc_position3d_subscribe (playerc_position3d_t *device, int access)
int playerc_position3d_unsubscribe (playerc_position3d_t *device)
void playerc_position3d_putdata (playerc_position3d_t *device, player_msghdr_t *header, player_position3d_data_t *data, size_t len)
int playerc_position3d_enable (playerc_position3d_t *device, int enable)
int playerc_position3d_get_geom (playerc_position3d_t *device)
int playerc_position3d_set_velocity (playerc_position3d_t *device, double vx, double vy, double vz, double vr, double vp, double vt, int state)
int playerc_position3d_set_speed (playerc_position3d_t *device, double vx, double vy, double vz, int state)
int playerc_position3d_set_pose (playerc_position3d_t *device, double gx, double gy, double gz, double gr, double gp, double gt)
int playerc_position3d_set_cmd_pose (playerc_position3d_t *device, double gx, double gy, double gz)
playerc_power_tplayerc_power_create (playerc_client_t *client, int index)
 Create a power device proxy.

void playerc_power_destroy (playerc_power_t *device)
 Destroy a power device proxy.

int playerc_power_subscribe (playerc_power_t *device, int access)
 Subscribe to the power device.

int playerc_power_unsubscribe (playerc_power_t *device)
 Un-subscribe from the power device.

playerc_ptz_tplayerc_ptz_create (playerc_client_t *client, int index)
 Create a ptz proxy.

void playerc_ptz_destroy (playerc_ptz_t *device)
 Destroy a ptz proxy.

int playerc_ptz_subscribe (playerc_ptz_t *device, int access)
 Subscribe to the ptz device.

int playerc_ptz_unsubscribe (playerc_ptz_t *device)
 Un-subscribe from the ptz device.

int playerc_ptz_set (playerc_ptz_t *device, double pan, double tilt, double zoom)
 Set the pan, tilt and zoom values.

int playerc_ptz_set_ws (playerc_ptz_t *device, double pan, double tilt, double zoom, double panspeed, double tiltspeed)
 Set the pan, tilt and zoom values (and speed).

playerc_sonar_tplayerc_sonar_create (playerc_client_t *client, int index)
 Create a sonar proxy.

void playerc_sonar_destroy (playerc_sonar_t *device)
 Destroy a sonar proxy.

int playerc_sonar_subscribe (playerc_sonar_t *device, int access)
 Subscribe to the sonar device.

int playerc_sonar_unsubscribe (playerc_sonar_t *device)
 Un-subscribe from the sonar device.

int playerc_sonar_get_geom (playerc_sonar_t *device)
 Get the sonar geometry.

playerc_truth_tplayerc_truth_create (playerc_client_t *client, int index)
 Create a truth proxy.

void playerc_truth_destroy (playerc_truth_t *device)
 Destroy a truth proxy.

int playerc_truth_subscribe (playerc_truth_t *device, int access)
 Subscribe to the truth device.

int playerc_truth_unsubscribe (playerc_truth_t *device)
 Un-subscribe from the truth device.

int playerc_truth_get_pose (playerc_truth_t *device, double *px, double *py, double *pz, double *rx, double *ry, double *rz)
 Get the object pose.

int playerc_truth_set_pose (playerc_truth_t *device, double px, double py, double pz, double rx, double ry, double rz)
 Set the object pose.

playerc_wifi_tplayerc_wifi_create (playerc_client_t *client, int index)
 Create a wifi proxy.

void playerc_wifi_destroy (playerc_wifi_t *device)
 Destroy a wifi proxy.

int playerc_wifi_subscribe (playerc_wifi_t *device, int access)
 Subscribe to the wifi device.

int playerc_wifi_unsubscribe (playerc_wifi_t *device)
 Un-subscribe from the wifi device.

playerc_wifi_link_tplayerc_wifi_get_link (playerc_wifi_t *device, int link)
 Get link state.

playerc_simulation_tplayerc_simulation_create (playerc_client_t *client, int index)
void playerc_simulation_destroy (playerc_simulation_t *device)
int playerc_simulation_subscribe (playerc_simulation_t *device, int access)
int playerc_simulation_unsubscribe (playerc_simulation_t *device)
void playerc_simulation_putdata (playerc_simulation_t *device, player_msghdr_t *header, player_simulation_data_t *data, size_t len)
int playerc_simulation_set_pose2d (playerc_simulation_t *device, char *name, double gx, double gy, double ga)
int playerc_simulation_get_pose2d (playerc_simulation_t *device, char *identifier, double *x, double *y, double *a)
playerc_gripper_tplayerc_gripper_create (playerc_client_t *client, int index)
 Create a gripper device proxy.

void playerc_gripper_destroy (playerc_gripper_t *device)
 Destroy a gripper device proxy.

int playerc_gripper_subscribe (playerc_gripper_t *device, int access)
 Subscribe to the gripper device.

int playerc_gripper_unsubscribe (playerc_gripper_t *device)
 Un-subscribe from the gripper device.

int playerc_gripper_set_cmd (playerc_gripper_t *device, uint8_t cmd, uint8_t arg)
 Send the gripper a command.

playerc_dio_tplayerc_dio_create (playerc_client_t *client, int index)
void playerc_dio_destroy (playerc_dio_t *device)
int playerc_dio_subscribe (playerc_dio_t *device, int access)
int playerc_dio_unsubscribe (playerc_dio_t *device)
int playerc_dio_set_output (playerc_dio_t *device, uint8_t output_count, uint32_t digout)
playerc_speech_tplayerc_speech_create (playerc_client_t *client, int index)
void playerc_speech_destroy (playerc_speech_t *device)
int playerc_speech_subscribe (playerc_speech_t *device, int access)
int playerc_speech_unsubscribe (playerc_speech_t *device)
int playerc_speech_say (playerc_speech_t *device, char *)

Define Documentation

#define MIN a,
 )     ((a < b) ? a : b)

#define MAX a,
 )     ((a > b) ? a : b)


The device access modes






The valid data delivery modes













Generated on Tue May 3 14:15:42 2005 for Player by doxygen 1.3.6