next up previous contents
Next: 2.12 MComProxy Up: 2. Class Reference Previous: 2.10 LaserProxy   Contents

Subsections

2.11 LocalizeProxy

The LocalizeProxy class is used to control a localize device, which can provide multiple pose hypotheses for a robot.

Attributes

unsigned int map_size_x, map_size_y;

Map dimensions (cells)

double map_scale;

Map scale (m/cell)

int8_t *map_cells;

Map data (empty = -1, unknown = 0, occupied = +1)

int pending_count;

Number of pending (unprocessed) sensor readings

int hypoth_count;

Number of possible poses

localize_hypoth hypoths[PLAYER_LOCALIZE_MAX_HYPOTHS];

Array of possible poses. Each pose contains the following information:

Methods

LocalizeProxy(PlayerClient* pc, unsigned short index,
unsigned char access = 'c')

Constructor. Leave the access field empty to start unconnected.

int SetPose(double pose[3], double cov[3][3])

Set the current pose hypothesis (m, m, radians). Returns 0 on success, -1 on error.

int GetNumParticles()

Get the number of particles (for particle filter-based localization systems). Returns the number of particles, or -1 on error.

int GetMap()

Get the map from the server. It's stored in map_size_x, map_size_y, map_scale, and map_cells. Returns 0 on success, -1 on error.

void Print()

Print out current hypotheses.


next up previous contents
Next: 2.12 MComProxy Up: 2. Class Reference Previous: 2.10 LaserProxy   Contents
2004-05-31