The ir interface provides access to an array of infrared (IR) range sensors.
#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
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)
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
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