From ITPWiki

Jump to: navigation, search

How to join the plugfest:

1) Get a robot.

All participating groups have some teleoperation capabilities, ranging from Phantom Omnis, to DaVinci systems and new surgical manipulators.

2) Use the ITP data interface.

PORT: Send data from master to slave on UDP port 36000

FRAME: Use a right-handed reference frame with, from the user's perspective, X-horizontal away from user, Y-horizontal to the right, Z-vertical down. Orientation is described by roll, pitch and yaw rotation around the X, Y and Z axes respectively.

DATA: Data is transmitted as position increments of X,Y,Z, and angle increments in Roll, Pitch, and Yaw. Use the binary "button_state" for grasp on/off ( 0/False = Open, 1/True = Closed ).

UNITS: Position increments are in integer microns. Orientation angle increments are in integer micro-radians.

DATA STRUCTURE: use the "struct u_struct" data structure specified in "itp_teleoperation.h". Left arm is arm 1, Right arm is arm 2.

DATA SENDING: the data structure should be sent in binary form via UDP. For example, the following pseudo-code could work:

 struct u_struct My_u_struct;
 size_t buflen = sizeof(struct u_struct);
 char buffer[buflen];
 memcpy( buffer, My_u_struct, buflen );
 sendto( MySocket, buffer, buflen , SlaveAddress);

Or, more compactly,

 struct u_struct My_u_struct;
 sendto(MySocket, (void*) My_U_Struct, sizeof(struct u_struct), SlaveAddress);

Also: "buttonstate" should indicate the binary, open/closed state of a grasper. "surgeon_mode" indicates if the user is engaged or disengaged. "Checksum" should be calculated as follows:

 int UDPChecksum(struct u_struct *u)
  int chk=0;
  chk =  (u->surgeon_mode);
  chk += (u->delx[0])+(u->dely[0])+(u->delz[0]);
  chk += (u->delx[1])+(u->dely[1])+(u->delz[1]);
  chk += (u->delyaw[0])+(u->delpitch[0])+(u->delroll[0]);
  chk += (u->delyaw[1])+(u->delpitch[1])+(u->delroll[1]);
  chk += (u->buttonstate[0]);
  chk += (u->buttonstate[1]);
  chk += (int)(u->sequence);
  return chk;
Personal tools