next up previous contents
Next: 6.16 laser Up: 6. Device Interfaces Previous: 6.14 gripper   Contents

Subsections


6.15 ir

Synopsis

The ir interface provides access to an array of infrared (IR) range sensors.

Constants

#define PLAYER_IR_MAX_SAMPLES 32
Maximum number of samples

#define PLAYER_IR_POSE_REQ ((uint8_t)1)
#define PLAYER_IR_POWER_REQ ((uint8_t)2)
config requests

Data



struct player_ir_data : The ir interface returns range readings from the IR array; the format is:

uint16_t range_count;
number of samples

uint16_t voltages[PLAYER_IR_MAX_SAMPLES];
voltages (units?)

uint16_t ranges[PLAYER_IR_MAX_SAMPLES];
ranges (mm)

Commands

This interface accepts no commands.

Configuration: Query pose

To query the pose of the IRs, use the following request, filling in only the subtype. The server will respond with the other fields filled in.



struct player_ir_pose : gets the pose of the IR sensors on a robot

uint16_t pose_count;
the number of ir samples returned by this robot

int16_t poses[PLAYER_IR_MAX_SAMPLES][3];
the pose of each IR detector on this robot (mm, mm, degrees)



struct player_ir_pose_req : ioctl struct for getting IR pose of a robot

uint8_t subtype;
subtype; must be PLAYER_IR_POSE_REQ

player_ir_pose_t poses;
the poses

Configuration: IR power



struct player_ir_power_req : To turn IR power on and off, use this request. The server will reply with a zero-length acknowledgement

uint8_t subtype;
must be PLAYER_IR_POWER_REQ

uint8_t state;
0 for power off, 1 for power on


next up previous contents
Next: 6.16 laser Up: 6. Device Interfaces Previous: 6.14 gripper   Contents
2004-06-02