57 player_gripper_data_t pdata;
58 memset( &pdata, 0,
sizeof(pdata) );
67 case ModelGripper::PADDLE_OPEN:
68 pdata.state = PLAYER_GRIPPER_STATE_OPEN;
70 case ModelGripper::PADDLE_CLOSED:
71 pdata.state = PLAYER_GRIPPER_STATE_CLOSED;
73 case ModelGripper::PADDLE_OPENING:
74 case ModelGripper::PADDLE_CLOSING:
75 pdata.state = PLAYER_GRIPPER_STATE_MOVING;
78 pdata.state = PLAYER_GRIPPER_STATE_ERROR;
84 PLAYER_GRIPPER_DATA_STATE,
95 if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD, PLAYER_GRIPPER_CMD_OPEN, this->
addr))
100 else if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD, PLAYER_GRIPPER_CMD_CLOSE, this->
addr))
106 if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_GRIPPER_REQ_GET_GEOM, this->
addr))
111 player_gripper_geom_t pgeom;
112 memset(&pgeom, 0,
sizeof(pgeom));
114 pgeom.pose.px = pose.
x;
115 pgeom.pose.py = pose.
y;
116 pgeom.pose.pz = pose.
z;
117 pgeom.pose.pyaw = pose.
a;
119 pgeom.outer_size.sl = geom.
size.
x;
120 pgeom.outer_size.sw = geom.
size.
y;
121 pgeom.outer_size.sh = geom.
size.
z;
125 this->
driver->Publish(this->
addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, PLAYER_GRIPPER_REQ_GET_GEOM, (
void*)&pgeom);
129 PRINT_WARN2(
"stage gripper doesn't support message id:%d/%d", hdr->type, hdr->subtype );
The Stage library uses its own namespace.
#define PRINT_WARN2(m, a, b)
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr_t *hdr, void *data)
meters_t z
location in 3 axes
Model * beam[2]
points to a model detected by the beams
virtual void Publish(void)
radians_t a
rotation about the z axis.
InterfaceGripper(player_devaddr_t addr, StgDriver *driver, ConfigFile *cf, int section)