next up previous contents
Next: 4.9 power Up: 4. Device Reference Previous: 4.7 localize   Contents

Subsections


4.8 position

Synopsis

The position proxy provides an interface to a mobile robot base, such as the ActiveMedia Pioneer series. The proxy supports both differential drive robots (which are capable of forward motion and rotation) and omni-drive robots (which are capable of forward, sideways and rotational motion).

Data



struct playerc_position_t : Position device data.

playerc_device_t info;
Device info; must be at the start of all device structures.

double pose[3];
double size[2];
Robot geometry in robot cs: pose gives the position and orientation, size gives the extent. These values are filled in by playerc_position_get_geom().

double px, py, pa;
Odometric pose (m, m, radians).

double vx, vy, va;
Odometric velocity (m, m, radians).

int stall;
Stall flag [0, 1].

Methods

playerc_position_t *playerc_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

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. The writes the result into the proxy rather than returning it to the caller.

int playerc_position_set_cmd_vel(playerc_position_t *device, double vx, double vy, double va, int state);

Set the target speed. vx : forward speed (m/s). vy : sideways speed (m/s); this field is used by omni-drive robots only. va : rotational speed (radians/s). All speeds are defined in the robot coordinate system.

int playerc_position_set_cmd_pose(playerc_position_t *device, double gx, double gy, double ga, int state);

Set the target pose (gx, gy, ga) is the target pose in the odometric coordinate system.


next up previous contents
Next: 4.9 power Up: 4. Device Reference Previous: 4.7 localize   Contents
2004-05-31