The truth interface provides access to the absolute state of entities. Note that, unless your robot has superpowers, truth devices are only avilable in Stage.
#define PLAYER_TRUTH_GET_POSE 0x00
#define PLAYER_TRUTH_SET_POSE 0x01 #define PLAYER_TRUTH_SET_POSE_ON_ROOT 0x02 #define PLAYER_TRUTH_GET_FIDUCIAL_ID 0x03 #define PLAYER_TRUTH_SET_FIDUCIAL_ID 0x04 |
Request packet subtypes.
struct player_truth_data : The truth interface returns data concerning the current state of
an entity; the format is:
int32_t px, py, pa; |
Object pose in world cs (mm, mm, degrees).
struct player_truth_pose : To get the pose of an object, use the following request, filling in only
the subtype with PLAYER_TRUTH_GET_POSE. The server will respond with the other fields filled in. To set the pose, set the subtype to PLAYER_TRUTH_SET_POS
and fill in the rest of the fields with the new pose.
uint8_t subtype; |
Packet subtype. Must be either PLAYER_TRUTH_GET_POSE or PLAYER_TRUTH_SET_POSE or PLAYER_TRUTH_SET_POSE_ON_ROOT. The last option places the object on the background and sets its pose. Great for repositioning pucks that have been picked up.
int32_t px, py, pa; |
Object pose in world cs (mm, mm, degrees).
struct player_truth_fiducial_id : To get the fiducial ID of an object, use the following request,
filling in only the subtype with PLAYER_TRUTH_GET_FIDUCIAL_ID. The
server will respond with the ID field filled in. To set the fiducial
ID, set the subtype to PLAYER_TRUTH_SET_FIDUCIAL_ID and fill in the ID field with the desired value
uint8_t subtype; |
Packet subtype. Must be either PLAYER_TRUTH_GET_FIDUCIAL_ID or PLAYER_TRUTH_SET_FIDUCIAL_ID
int16_t id; |
the fiducial ID