The fiducial interface provides access to devices that detect coded fiducials (markers) placed in the environment.
|#define PLAYER_FIDUCIAL_MAX_SAMPLES 32|
The maximum number of fiducials that can be detected at one time.
|#define PLAYER_FIDUCIAL_MAX_MSG_LEN 32|
The maximum size of a data packet exchanged with a fiducial at one time.
#define PLAYER_FIDUCIAL_GET_GEOM 0x01
#define PLAYER_FIDUCIAL_GET_FOV 0x02
#define PLAYER_FIDUCIAL_SET_FOV 0x03
#define PLAYER_FIDUCIAL_SEND_MSG 0x04
#define PLAYER_FIDUCIAL_RECV_MSG 0x05
#define PLAYER_FIDUCIAL_EXCHANGE_MSG 0x06
Request packet subtypes
The fiducial data packet contains a list of the detected fiducials. Each fiducial is described by the player_fiducial_item structure listed below.
struct player_fiducial_item : The fiducial data packet (one fiducial).
The fiducial id. Fiducials that cannot be identified get id -1.
Fiducial pose relative to the detector (range, bearing, orient) in units (mm, degrees, degrees).
Uncertainty in the measured pose (range, bearing, orient) in units of (mm, degrees, degrees).
struct player_fiducial_data : The fiducial data packet (all fiducials).
The number of detected fiducials
List of detected fiducials
This device accepts no commands.
The geometry (pose and size) of the fiducial device can be queried using the PLAYER_FIDUCIAL_GET_GEOM request. The request and reply packets have the same format.
struct player_fiducial_geom : Fiducial geometry packet.
Packet subtype. Must be PLAYER_FIDUCIAL_GET_GEOM.
Pose of the detector in the robot cs (x, y, orient) in units if (mm, mm, degrees).
Size of the detector in units of (mm, mm)
Dimensions of the fiducials in units of (mm, mm).
The field of view of the fiducial device can be set using the PLAYER_FIDUCIAL_SET_FOV request, and queried using the PLAYER_FIDUCIAL_GET_FOV request. The device replies to a SET request with the actual FOV achieved. In both cases the request and reply packets have the same format.
struct player_fiducial_fov : Fiducial geometry packet.
Packet subtype. PLAYER_FIDUCIAL_GET_FOV or PLAYER_FIDUCIAL_SET_FOV.
The minimum range of the sensor in mm
The maximum range of the sensor in mm
The receptive angle of the sensor in degrees.
NOTE: These configs are currently supported only by the Stage fiducial driver (stg_fidicial), but are intended to be a general interface for addressable, peer-to-peer messaging.
The fiducial sensor can attempt to send a message to a target using the PLAYER_FIDUCIAL_SEND_MSG request. If target_id is -1, the message is broadcast to all targets. The device replies with an ACK if the message was sent OK, but receipt by the target is not guaranteed. The intensity field sets a transmit power in device-dependent units. If the consume flag is set, the message is transmitted just once. If it is unset, the message may transmitted repeatedly (at device-dependent intervals, if at all).
Send a PLAYER_FIDUCIAL_RECV_MSG request to obtain the last message recieved from the indicated target. If the consume flag is set, the message is deleted from the device's buffer, if unset, the same message can be retreived multiple times until a new message arrives. The power field indicates the intensity of the recieved messag, again in device-dependent units.
Similarly, the PLAYER_FIDUCIAL_EXCHANGE_MSG request sends a message, then returns the most recently received message. Depending on the device and the situation, this could be a reflection of the sent message, a reply from the target of the sent message, or a message received from an unrelated sender.
Fiducial exchange mesaage request. The device sends the message, then replies with the last message received, which may be (but is not guaranteed to be) be a reply to the sent message. NOTE: this is not yet supported by Stage-1.4.