Difference between revisions of "ProstateBRP OpenIGTLink Communication June 2013"

From NAMIC Wiki
Jump to: navigation, search
Tag: 2017 source edit
 
(23 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
==Notations==
 
==Notations==
 +
 
*STRING(NN, SS) (see http://openigtlink.org/protocols/v2_string.html)
 
*STRING(NN, SS) (see http://openigtlink.org/protocols/v2_string.html)
 
**NN: Device name in the OpenIGTLink header. (Max. 20 bytes)
 
**NN: Device name in the OpenIGTLink header. (Max. 20 bytes)
Line 7: Line 8:
 
*STATE(NN, CC:SS:EE:MM) (see http://openigtlink.org/protocols/v2_status.html )
 
*STATE(NN, CC:SS:EE:MM) (see http://openigtlink.org/protocols/v2_status.html )
 
**NN: Device type in the OpenIGTLink header. (Max. 20 bytes)
 
**NN: Device type in the OpenIGTLink header. (Max. 20 bytes)
**CC: Code  
+
**CC: Code
 
**SS: Subcode
 
**SS: Subcode
 
**EE: Error name (Max 20 bytes) -- no predefined name. It will logged or show up on navigation screen as it is.
 
**EE: Error name (Max 20 bytes) -- no predefined name. It will logged or show up on navigation screen as it is.
Line 14: Line 15:
 
**NN: Device type in the OpenIGTLink header. (Max. 20 bytes)
 
**NN: Device type in the OpenIGTLink header. (Max. 20 bytes)
 
**TT: 4x4 linear transformation matrix
 
**TT: 4x4 linear transformation matrix
 +
*IMAGE(NN, I) (see http://openigtlink.org/protocols/v2_image.html)
 +
**NN: Device type in the OpenIGTLink header. (Max. 20 bytes)
 +
**I: Image
  
 
+
==Diagram (Slicer - Robot)==
==Diagram==
+
<span style="color:#800000"></span>
<span style="color:#800000">
 
</span>
 
  
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
|-
 
|-
| align="left style="background:#e0e0e0;" | ''3D Slicer (operator)''
+
| align="left style=" background:#e0e0e0;" |''3D Slicer (operator)''
| align="left style="background:#e0e0e0;" | ''Message''
+
| align="left style=" background:#e0e0e0;" |''Message''
| align="left style="background:#e0e0e0;" | ''Robot Controller''
+
| align="left style=" background:#e0e0e0;" |''Robot Controller''
| align="left style="background:#e0e0e0;" | ''Radiologist''
+
| align="left style=" background:#e0e0e0;" |''Radiologist''
| align="left style="background:#e0e0e0;" | ''Note''
+
| align="left style=" background:#e0e0e0;" |''Note''
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | Start-up
+
| colspan="5" align="center" style="background:#f0f0f0;" |Start-up
 
|-
 
|-
| align="left" | The operator presses "Start-up" button
+
| align="left" |The operator presses "Start-up" button
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" | Send command to robot
+
| align="left" |Send command to robot
| align="left" | >> STRING(CMD_XXXX, START_UP) >>
+
| align="left" |>> STRING(CMD_XXXX, START_UP) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
+
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STRING(ACK_XXXX, START_UP) <<  
+
| align="left" |<< STRING(ACK_XXXX, START_UP) <<
| align="left" | Echo back an acknowledgement command was received, but not yet completed
+
| align="left" |Echo back an acknowledgement command was received, but not yet completed
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the START_UP message.
+
| align="left" |XXXX is the same unique query ID as the START_UP message.
 
|-
 
|-
| align="left" style="background:#f8f8f8;" |  
+
| align="left" style="background:#f8f8f8;" |
| align="left" style="background:#f8f8f8;;" | << STATUS(CURRENT_STATUS, Code:0:Phase) <<
+
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
| align="left" style="background:#f8f8f8;;" | '''Code=OK:''' Confirm that the robot is transition to START_UP mode. Phase should be "START_UP". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
+
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the robot is transition to START_UP mode. Phase should be "START_UP". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
| align="left" style="background:#f8f8f8;;" |  
+
| align="left" style="background:#f8f8f8;;" |
| align="left" style="background:#f8f8f8;;" | DNR: Device not ready (13)
+
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Start up and initialize the hardware. Run the robot homing procedure if necessary (skip if already successfully completed). Move robot to home (loading) configuration.  
+
| align="left" |Start up and initialize the hardware. Run the robot homing procedure if necessary (skip if already successfully completed). Move robot to home (loading) configuration.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STATUS(START_UP, Code:??:??) <<
+
| align="left" |<< STATUS(START_UP, Code:??:??) <<
| align="left" | '''Code=OK:''' Confirm when robot is initialized <br>'''Code>=2''': Error. See [http://openigtlink.org/protocols/v2_status.html error list]
+
| align="left" |'''Code=OK:''' Confirm when robot is initialized <br>'''Code>=2''': Error. See [http://openigtlink.org/protocols/v2_status.html error list]
| align="left" |  
+
| align="left" |
 
| align="left" |
 
| align="left" |
 
|-
 
|-
| align="left" | Display the result of start up process.
+
| align="left" |Display the result of start up process.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 +
| align="left" |
 
| align="left" |
 
| align="left" |
| align="left" |
 
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | Planning
+
| colspan="5" align="center" style="background:#f0f0f0;" |Planning
 
|-
 
|-
| align="left" | The operator opens the planning panel
+
| align="left" |The operator opens the planning panel
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> STRING(CMD_XXXX, PLANNING) >>
+
| align="left" |>> STRING(CMD_XXXX, PLANNING) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
+
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STRING(ACK_XXXX, PLANNING) <<  
+
| align="left" |<< STRING(ACK_XXXX, PLANNING) <<
| align="left" | Echo back an acknowledgement command was received  
+
| align="left" |Echo back an acknowledgement command was received
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the PLANNING message.
+
| align="left" |XXXX is the same unique query ID as the PLANNING message.
 
|-
 
|-
| align="left" style="background:#f8f8f8;" |  
+
| align="left" style="background:#f8f8f8;" |
| align="left" style="background:#f8f8f8;;" | << STATUS(CURRENT_STATUS, Code:0:Phase) <<
+
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
| align="left" style="background:#f8f8f8;;" | '''Code=OK:''' Confirm that the robot is transition to PLANNING mode. Phase should be "PLANNING". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
+
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the robot is transition to PLANNING mode. Phase should be "PLANNING". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
| align="left" style="background:#f8f8f8;;" |  
+
| align="left" style="background:#f8f8f8;;" |
| align="left" style="background:#f8f8f8;;" | DNR: Device not ready (13)
+
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Do nothing except keep track of current state, robot is awaiting next workphase.  
+
| align="left" |Do nothing except keep track of current state, robot is awaiting next workphase.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" | Show that the robot is in PLANNING phase.
+
| align="left" |Show that the robot is in PLANNING phase.
| align="left" |  
+
| align="left" |
 +
| align="left" |
 +
| align="left" |
 
| align="left" |
 
| align="left" |
| align="left" |
 
| align="left" |
 
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | Calibration
+
| colspan="5" align="center" style="background:#f0f0f0;" |Calibration
 
|-
 
|-
| align="left" | The operator opens the calibration panel
+
| align="left" |The operator opens the calibration panel
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> STRING(CMD_XXXX, CALIBRATION) >>
+
| align="left" |>> STRING(CMD_XXXX, CALIBRATION) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
+
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STRING(ACK_XXXX, CALIBRATION) <<
+
| align="left" |<< STRING(ACK_XXXX, CALIBRATION) <<
| align="left" | Echo back an acknowledgement command was received
+
| align="left" |Echo back an acknowledgement command was received
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the CALIBRATION message.
+
| align="left" |XXXX is the same unique query ID as the CALIBRATION message.
 
|-
 
|-
| align="left" style="background:#f8f8f8;" |  
+
| align="left" style="background:#f8f8f8;" |
| align="left" style="background:#f8f8f8;;" | << STATUS(CURRENT_STATUS, Code:0:Phase) <<
+
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
| align="left" style="background:#f8f8f8;;" | '''Code=OK:''' Confirm that the robot is transition to CALIBRATION mode. Phase should be "CALIBRATION". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
+
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the robot is transition to CALIBRATION mode. Phase should be "CALIBRATION". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
| align="left" style="background:#f8f8f8;;" |  
+
| align="left" style="background:#f8f8f8;;" |
| align="left" style="background:#f8f8f8;;" | DNR: Device not ready (13)
+
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Do nothing except keep track of current state, robot is awaiting calibration transform
+
| align="left" |Do nothing except keep track of current state, robot is awaiting calibration transform
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" | Show that the robot is in CALIBRATION phase.
+
| align="left" |Show that the robot is in CALIBRATION phase.
| align="left" |  
+
| align="left" |
 +
| align="left" |
 +
| align="left" |
 
| align="left" |
 
| align="left" |
| align="left" |
 
| align="left" | 
 
 
|-
 
|-
| align="left" | Nav Software (3D Slicer or RadVision) calculates calibration matrix
+
| align="left" |Nav Software (3D Slicer or RadVision) calculates calibration matrix
| align="left" |  
+
| align="left" |
 +
| align="left" |
 +
| align="left" |
 
| align="left" |
 
| align="left" |
| align="left" |
 
| align="left" |
 
 
|-
 
|-
| align="left" |
 
| align="left" | >> TRANSFORM(CLB_XXXX, 4x4 calibration matrix in RAS coordinates) >>
 
 
| align="left" |
 
| align="left" |
| align="left" |  
+
| align="left" |>> TRANSFORM(CLB_XXXX, 4x4 calibration matrix in RAS coordinates) >>
 +
| align="left" |
 +
| align="left" |
 
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << TRANSFORM(ACK_XXXX, Calibration matrix in RAS coordinates) <<
+
| align="left" |<< TRANSFORM(ACK_XXXX, Calibration matrix in RAS coordinates) <<
| align="left" | Echo back an acknowledgement transform was received
+
| align="left" |Echo back an acknowledgement transform was received
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the CLB message.
+
| align="left" |XXXX is the same unique query ID as the CLB message.
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Update calibration transform, set flag that registration has been set externally, reply with confirmation
+
| align="left" |Update calibration transform, set flag that registration has been set externally, reply with confirmation
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STATUS(CALIBRATION, Code:??:??) <<
+
| align="left" |<< STATUS(CALIBRATION, Code:??:??) <<
| align="left" | '''Code=OK:''' Confirm that calibration was received and robot is ready for next workphase <br>'''Code=CE''': Error.  
+
| align="left" |'''Code=OK:''' Confirm that calibration was received and robot is ready for next workphase <br>'''Code=CE''': Error.
| align="left" |  
+
| align="left" |
| align="left" | CE: Configuration Error (code 10)
+
| align="left" |CE: Configuration Error (code 10)
 
|-
 
|-
| align="left" | Show that calibration successfully sent to robot or failed.
+
| align="left" |Show that calibration successfully sent to robot or failed.
| align="left" |  
+
| align="left" |
 +
| align="left" |
 
| align="left" |
 
| align="left" |
 
| align="left" |
 
| align="left" |
| align="left" |
 
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | Targeting
+
| colspan="5" align="center" style="background:#f0f0f0;" |Targeting
 
|-
 
|-
| align="left" | The operator enters "Targeting" mode
+
| align="left" |The operator enters "Targeting" mode
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
| align="left" |
 
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> STRING(CMD_XXXX, TARGETING) >>
+
| align="left" |>> STRING(CMD_XXXX, TARGETING) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STRING(ACK_XXXX, TARGETING) <<
+
| align="left" |<< STRING(ACK_XXXX, TARGETING) <<
| align="left" | Acknowledge receiving targeting command
+
| align="left" |Acknowledge receiving targeting command
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the TARGETING message.
+
| align="left" |XXXX is the same unique query ID as the TARGETING message.
 
|-
 
|-
| align="left" style="background:#f8f8f8;" |  
+
| align="left" style="background:#f8f8f8;" |
| align="left" style="background:#f8f8f8;;" | << STATUS(CURRENT_STATUS, Code:0:Phase) <<
+
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
| align="left" style="background:#f8f8f8;;" | '''Code=OK:''' Confirm that the robot is transition to TARGETING mode. Phase should be "TARGETING". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
+
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the robot is transition to TARGETING mode. Phase should be "TARGETING". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
| align="left" style="background:#f8f8f8;;" |  
+
| align="left" style="background:#f8f8f8;;" |
| align="left" style="background:#f8f8f8;;" | DNR: Device not ready (13)
+
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 
|-
 
|-
| align="left" |
 
| align="left" |
 
| align="left" | Confirm if robot is ready for targeting; check if calibration was received; return robot to home (loading) position, if needed.
 
 
| align="left" |
 
| align="left" |
| align="left" |  
+
| align="left" |
 +
| align="left" |Confirm if robot is ready for targeting; check if calibration was received; return robot to home (loading) position, if needed.
 +
| align="left" |
 +
| align="left" |
 
|-
 
|-
| align="left" |
 
| align="left" | << STATUS(TARGETING, Code:??:??) <<
 
| align="left" | '''Code=OK:''' Confirm robot has entered targeting mode. <br>'''Code=DNR:''' If not able to enter targeting mode (i.e. calibration not received)
 
 
| align="left" |
 
| align="left" |
| align="left" | DNR: Device Not Ready (code 13)
+
| align="left" |<< STATUS(TARGETING, Code:??:??) <<
 +
| align="left" |'''Code=OK:''' Confirm robot has entered targeting mode. <br>'''Code=DNR:''' If not able to enter targeting mode (i.e. calibration not received)
 +
| align="left" |
 +
| align="left" |DNR: Device Not Ready (code 13)
 
|-
 
|-
| align="left" | The operator select a target, Nav software creates a 4x4 matrix for desired 6-DOF robot pose to reach the target
+
| align="left" |The operator select a target, Nav software creates a 4x4 matrix for desired 6-DOF robot pose to reach the target
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> TRANSFORM(TGT_XXXXX, 4x4 target matrix in RAS coordinates) >>
+
| align="left" |>> TRANSFORM(TGT_XXXXX, 4x4 target matrix in RAS coordinates) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | XXXX is a unique query ID (string of any ASCII letters up to 16 bytes). The unique ID may be used as a human-readable target name on the robot control software. For example, TGT_LeftApex-2 is for the second targeting attempt on a lesion in the left-apex.  
+
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes). The unique ID may be used as a human-readable target name on the robot control software. For example, TGT_LeftApex-2 is for the second targeting attempt on a lesion in the left-apex.
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << TRANSFORM(ACK_XXXXX, 4x4 target matrix) <<
+
| align="left" |<< TRANSFORM(ACK_XXXXX, 4x4 target matrix) <<
| align="left" | Acknowledge receipt of target transformation by echoing back
+
| align="left" |Acknowledge receipt of target transformation by echoing back
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the TARGETING message.
+
| align="left" |XXXX is the same unique query ID as the TARGETING message.
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Calculate if target pose is reachable based on the kinematics, reply with status and set target
+
| align="left" |Calculate if target pose is reachable based on the kinematics, reply with status and set target
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |
 
| align="left" | << STATUS(TARGET, Code:??:??) <<
 
| align="left" | '''Code=OK:''' Reply with OK if target was accepted <br/>'''Code=DNR:''' Not in targeting mode <br/> '''Code=CE:''' Not a valid target (i.e. out of workspace)
 
 
| align="left" |
 
| align="left" |
| align="left" | DNR: Device Not Ready (code 13) <br> CE: Configuration Error (code 10)  
+
| align="left" |<< STATUS(TARGET, Code:??:??) <<
 +
| align="left" |'''Code=OK:''' Reply with OK if target was accepted <br />'''Code=DNR:''' Not in targeting mode <br /> '''Code=CE:''' Not a valid target (i.e. out of workspace)
 +
| align="left" |
 +
| align="left" |DNR: Device Not Ready (code 13) <br> CE: Configuration Error (code 10)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << TRANSFORM(TARGET, 4x4 target matrix) <<
+
| align="left" |<< TRANSFORM(TARGET, 4x4 target matrix) <<
| align="left" | Send actual target pose in robot controller if one was set (corresponds to when status comes back OK)
+
| align="left" |Send actual target pose in robot controller if one was set (corresponds to when status comes back OK)
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" | Display the reachable target position set in robot controller.
+
| align="left" |Display the reachable target position set in robot controller.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" | The operator confirms the target position set in the controller, and press "MOVE"
+
| align="left" |The operator confirms the target position set in the controller, and press "MOVE"
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> STRING(CMD_XXXX, MOVE_TO_TARGET) >>
+
| align="left" |>> STRING(CMD_XXXX, MOVE_TO_TARGET) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
+
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STRING(ACK_XXXX, MOVE_TO_TARGET) <<  
+
| align="left" |<< STRING(ACK_XXXX, MOVE_TO_TARGET) <<
| align="left" | Echo back an acknowledgement command was received (not yet completed)
+
| align="left" |Echo back an acknowledgement command was received (not yet completed)
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the MOVE_TO_TARGET message. <font color=red>See the note below</red>
+
| align="left" |XXXX is the same unique query ID as the MOVE_TO_TARGET message. <font color="red">See the note below</font>
 
|-
 
|-
| align="left" | Alert the clinician to hold footpedal to align the robot
+
| align="left" |Alert the clinician to hold footpedal to align the robot
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Clinician engages interlock (footpedal in scanner room) to enable robot motion. Robot will only move when interlock is engaged following a move command.  
+
| align="left" |Clinician engages interlock (footpedal in scanner room) to enable robot motion. Robot will only move when interlock is engaged following a move command.
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | The robot moves to the target and streams its pose during motion
+
| align="left" |The robot moves to the target and streams its pose during motion
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
+
| align="left" |<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
| align="left" | Stream current robot pose in RAS coords as moving. Can also be requested (see below).
+
| align="left" |Stream current robot pose in RAS coords as moving. Can also be requested (see below).
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" | Display the current robot position as it moves toward the target.
+
| align="left" |Display the current robot position as it moves toward the target.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Display that the robot is at the target. Send confirmation.
+
| align="left" |Display that the robot is at the target. Send confirmation.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |
 
| align="left" | << STATUS(MOVE_TO_TARGET, Code:??:??) <<
 
| align="left" | '''Code=OK:''' Robot reaches target <br> '''Code >= 3:''' Return error code when the device fails to move to the target. See [http://openigtlink.org/protocols/v2_status.html error list]
 
 
| align="left" |
 
| align="left" |
| align="left" |  
+
| align="left" |<< STATUS(MOVE_TO_TARGET, Code:??:??) <<
 +
| align="left" |'''Code=OK:''' Robot reaches target <br> '''Code >= 3:''' Return error code when the device fails to move to the target. See [http://openigtlink.org/protocols/v2_status.html error list]
 +
| align="left" |
 +
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
+
| align="left" |<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
| align="left" | Push out final robot pose in RAS coords as moving. (same format as previous stream - ensures last one is at final position)
+
| align="left" |Push out final robot pose in RAS coords as moving. (same format as previous stream - ensures last one is at final position)
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" | Display the current final robot position at the target.
+
| align="left" |Display the current final robot position at the target.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | Needle Insertion (Manual)
+
| colspan="5" align="center" style="background:#f0f0f0;" |Needle Insertion (Manual)
 
|-
 
|-
| align="left" | Ask to lock the robot
+
| align="left" |Ask to lock the robot
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | The operator presses "Lock" button
+
| align="left" |The operator presses "Lock" button
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> STRING (CMD_XXXX, MANUAL) >>
+
| align="left" |>> STRING (CMD_XXXX, MANUAL) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
+
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STRING(ACK_XXXX, MANUAL) <<  
+
| align="left" |<< STRING(ACK_XXXX, MANUAL) <<
| align="left" | Echo back an acknowledgement command was received (not yet completed)
+
| align="left" |Echo back an acknowledgement command was received (not yet completed)
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the MANUAL message.
+
| align="left" |XXXX is the same unique query ID as the MANUAL message.
 
|-
 
|-
| align="left" style="background:#f8f8f8;" |  
+
| align="left" style="background:#f8f8f8;" |
| align="left" style="background:#f8f8f8;;" | << STATUS(CURRENT_STATUS, Code:0:Phase) <<
+
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
| align="left" style="background:#f8f8f8;;" | '''Code=OK:''' Confirm that the robot is transition to MANUAL mode. Phase should be "MANUAL". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
+
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the robot is transition to MANUAL mode. Phase should be "MANUAL". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
| align="left" style="background:#f8f8f8;;" |  
+
| align="left" style="background:#f8f8f8;;" |
| align="left" style="background:#f8f8f8;;" | DNR: Device not ready (13)
+
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Cut motor power to prevent motion of the robot base. This also eliminates causes of MR interference for insertion under live imaging.
+
| align="left" |Cut motor power to prevent motion of the robot base. This also eliminates causes of MR interference for insertion under live imaging.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |
 
| align="left" | << STATUS(MANUAL, OK:??:??) <<
 
| align="left" | Reply with OK when robot is in a safe, locked state
 
 
| align="left" |
 
| align="left" |
| align="left" |  
+
| align="left" |<< STATUS(MANUAL, OK:??:??) <<
 +
| align="left" |Reply with OK when robot is in a safe, locked state
 +
| align="left" |
 +
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Insert a needle, optionally under live MR imaging. Perform intervention with the needle (biopsy or seed placement).  
+
| align="left" |Insert a needle, optionally under live MR imaging. Perform intervention with the needle (biopsy or seed placement).
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Retract the needle  
+
| align="left" |Retract the needle
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" | Ask to unlock the robot and confirm needle is retracted
+
| align="left" |Ask to unlock the robot and confirm needle is retracted
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | The operator presses "Unlock"
+
| align="left" |The operator presses "Unlock"
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Return to the TARGETING phase (Slicer sends STRING(ACK_XXXXX, TARGETING) )
+
| align="left" |Return to the TARGETING phase (Slicer sends STRING(ACK_XXXXX, TARGETING) )
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | All workhpases
+
| colspan="5" align="center" style="background:#f0f0f0;" |All workhpases
 
|-
 
|-
| align="left" | The operator presses "Stop" button
+
| align="left" |The operator presses "Stop" button
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> STRING(CMD_XXXX, STOP) >>
+
| align="left" |>> STRING(CMD_XXXX, STOP) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
+
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STRING(ACK_XXXX, STOP) <<
+
| align="left" |<< STRING(ACK_XXXX, STOP) <<
| align="left" | Acknowledge receiving targeting command
+
| align="left" |Acknowledge receiving targeting command
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the STOP message.
+
| align="left" |XXXX is the same unique query ID as the STOP message.
 
|-
 
|-
| align="left" style="background:#f8f8f8;" |  
+
| align="left" style="background:#f8f8f8;" |
| align="left" style="background:#f8f8f8;;" | << STATUS(CURRENT_STATUS, Code:0:Phase) <<
+
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
| align="left" style="background:#f8f8f8;;" | '''Code=OK:''' Confirm that the robot is transition to STOP mode. Phase should be "STOP". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
+
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the robot is transition to STOP mode. Phase should be "STOP". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
| align="left" style="background:#f8f8f8;;" |  
+
| align="left" style="background:#f8f8f8;;" |
| align="left" style="background:#f8f8f8;;" | DNR: Device not ready (13)
+
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | The robot stops all motion. Stays in current state/workphase.
+
| align="left" |The robot stops all motion. Stays in current state/workphase.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STATUS(STOP, OK:??:??) <<
+
| align="left" |<< STATUS(STOP, OK:??:??) <<
| align="left" | Reply with OK when robot stopped safely.
+
| align="left" |Reply with OK when robot stopped safely.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | All workhpases
+
| colspan="5" align="center" style="background:#f0f0f0;" |All workhpases
 
|-
 
|-
| align="left" | The operator presses "Emergency" button
+
| align="left" |The operator presses "Emergency" button
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> STRING(CMD_XXXX, EMERGENCY) >>
+
| align="left" |>> STRING(CMD_XXXX, EMERGENCY) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
+
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STRING(ACK_XXXX, EMERGENCY) <<
+
| align="left" |<< STRING(ACK_XXXX, EMERGENCY) <<
| align="left" | Acknowledge receiving targeting command
+
| align="left" |Acknowledge receiving targeting command
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the STOP message.
+
| align="left" |XXXX is the same unique query ID as the STOP message.
 
|-
 
|-
| align="left" style="background:#f8f8f8;" |  
+
| align="left" style="background:#f8f8f8;" |
| align="left" style="background:#f8f8f8;;" | << STATUS(CURRENT_STATUS, Code:0:Phase) <<
+
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
| align="left" style="background:#f8f8f8;;" | '''Code=OK:''' Confirm that the robot is transition to EMERGENCY mode. Phase should be "EMERGENCY". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
+
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the robot is transition to EMERGENCY mode. Phase should be "EMERGENCY". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
| align="left" style="background:#f8f8f8;;" |  
+
| align="left" style="background:#f8f8f8;;" |
| align="left" style="background:#f8f8f8;;" | DNR: Device not ready (13)
+
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | The robot stops all motion and disables/locks motors. Switches to Emergency state/workphase. ?? IS THIS THE DESIRED ACTION
+
| align="left" |The robot stops all motion and disables/locks motors. Switches to Emergency state/workphase. ?? IS THIS THE DESIRED ACTION
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STATUS(EMERGENCY, Emergency:??:??) <<
+
| align="left" |<< STATUS(EMERGENCY, Emergency:??:??) <<
| align="left" | Reply with OK when robot stopped safely.
+
| align="left" |Reply with OK when robot stopped safely.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | All workhpases
+
| colspan="5" align="center" style="background:#f0f0f0;" |All workhpases
 
|-
 
|-
| align="left" | Request current robot pose (or target or calibration transforms)
+
| align="left" |Request current robot pose (or target or calibration transforms)
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> GET_TRANSFORM(CURRENT_POSITION) >>
+
| align="left" |>> GET_TRANSFORM(CURRENT_POSITION) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | The robot transmits current pose ("CURRENT_POSITION") through IGTLink upon request. This also works for requesting "TARGET_POSITION" and "CALIBRATION" transforms stored in robot controller.
+
| align="left" |The robot transmits current pose ("CURRENT_POSITION") through IGTLink upon request. This also works for requesting "TARGET_POSITION" and "CALIBRATION" transforms stored in robot controller.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
+
| align="left" |<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | All workhpases
+
| colspan="5" align="center" style="background:#f0f0f0;" |All workhpases
 
|-
 
|-
| align="left" | Request the robot status/workphase
+
| align="left" |Request the robot status/workphase
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> GET_STATUS(CURRENT_STATUS) >> ?? CONFIRM COMMAND STRUCTURE FOR STATUS REQUEST
+
| align="left" |>> GET_STATUS(CURRENT_STATUS) >> ?? CONFIRM COMMAND STRUCTURE FOR STATUS REQUEST
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
| align="left" |
 
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Sends current state/workphase. ?? SHOULD IT SEND OTHER INFO TOO
+
| align="left" |Sends current state/workphase. ?? SHOULD IT SEND OTHER INFO TOO
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |
 
| align="left" | << STATUS(CURRENT_STATUS, Code:0:Status) <<
 
| align="left" | Send status code. Status should be the name of the current status e.g. "TARGETING". Code is OK, when the robot is successfully determines its workphase. Otherwise, Code should be configuration error (10)
 
 
| align="left" |
 
| align="left" |
| align="left" |  
+
| align="left" |<< STATUS(CURRENT_STATUS, Code:0:Status) <<
 +
| align="left" |Send status code. Status should be the name of the current status e.g. "TARGETING". Code is OK, when the robot is successfully determines its workphase. Otherwise, Code should be configuration error (10)
 +
| align="left" |
 +
| align="left" |
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | All workhpases
+
| colspan="5" align="center" style="background:#f0f0f0;" |All workhpases
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Robot controller sends errors or notifications through IGTLink. Transmitted asynchronously with error text in message body. To be used with limit events, hardware failures, invalid commands, etc.
+
| align="left" |Robot controller sends errors or notifications through IGTLink. Transmitted asynchronously with error text in message body. To be used with limit events, hardware failures, invalid commands, etc.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STATUS(ERROR, Code:??:Error name) <<
+
| align="left" |<< STATUS(ERROR, Code:??:Error name) <<
| align="left" | | align="left" | Send status code. [http://openigtlink.org/protocols/v2_status.html error list]
+
| align="left" |<nowiki>| align="left" | Send status code. </nowiki>[http://openigtlink.org/protocols/v2_status.html error list]
| align="left" |  
+
| align="left" |
| align="left" |
+
| align="left" |
 
|}
 
|}
  
<font color=red>NOTE: Suggested modification -- Agreed on 9/5/13</font>
+
<font color="red">NOTE: Suggested modification -- Agreed on 9/5/13</font>
  
 
Although MOVE_TO_TARGET workphase is currently part of TARGETING, Nirav suggested to make MOVE_TO_TARGET phase an independent workhpase. If we agree, the MOVE_TO_TARGET workphase should be defined as follows:
 
Although MOVE_TO_TARGET workphase is currently part of TARGETING, Nirav suggested to make MOVE_TO_TARGET phase an independent workhpase. If we agree, the MOVE_TO_TARGET workphase should be defined as follows:
Line 553: Line 555:
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
|-
 
|-
| align="left style="background:#e0e0e0;" | ''3D Slicer (operator)''
+
| align="left style=" background:#e0e0e0;" |''3D Slicer (operator)''
| align="left style="background:#e0e0e0;" | ''Message''
+
| align="left style=" background:#e0e0e0;" |''Message''
| align="left style="background:#e0e0e0;" | ''Robot Controller''
+
| align="left style=" background:#e0e0e0;" |''Robot Controller''
| align="left style="background:#e0e0e0;" | ''Radiologist''
+
| align="left style=" background:#e0e0e0;" |''Radiologist''
| align="left style="background:#e0e0e0;" | ''Note''
+
| align="left style=" background:#e0e0e0;" |''Note''
 
|-
 
|-
| colspan=5 align="center" style="background:#f0f0f0;" | Move to Target
+
| colspan="5" align="center" style="background:#f0f0f0;" |Move to Target
 
|-
 
|-
| align="left" | The operator confirms the target position set in the controller, and press "MOVE"
+
| align="left" |The operator confirms the target position set in the controller, and press "MOVE"
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | >> STRING(CMD_XXXX, MOVE_TO_TARGET) >>
+
| align="left" |>> STRING(CMD_XXXX, MOVE_TO_TARGET) >>
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
+
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << STRING(ACK_XXXX, MOVE_TO_TARGET) <<  
+
| align="left" |<< STRING(ACK_XXXX, MOVE_TO_TARGET) <<
| align="left" | Echo back an acknowledgement command was received (not yet completed)
+
| align="left" |Echo back an acknowledgement command was received (not yet completed)
| align="left" |  
+
| align="left" |
| align="left" | XXXX is the same unique query ID as the MOVE_TO_TARGET message. <font color=red>See the note below</red>
+
| align="left" |XXXX is the same unique query ID as the MOVE_TO_TARGET message. <font color="red">See the note below</font>
 
|-
 
|-
| align="left" style="background:#f8f8f8;" |  
+
| align="left" style="background:#f8f8f8;" |
| align="left" style="background:#f8f8f8;;" | << STATUS(CURRENT_STATUS, Code:0:Phase) <<
+
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
| align="left" style="background:#f8f8f8;;" | '''Code=OK:''' Confirm that the robot is transition to MOVE_TO_TARGET mode. Phase should be "MOVE_TO_TARGET". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
+
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the robot is transition to MOVE_TO_TARGET mode. Phase should be "MOVE_TO_TARGET". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
| align="left" style="background:#f8f8f8;;" |  
+
| align="left" style="background:#f8f8f8;;" |
| align="left" style="background:#f8f8f8;;" | DNR: Device not ready (13)
+
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 
|-
 
|-
| align="left" | Alert the clinician to hold footpedal to align the robot
+
| align="left" |Alert the clinician to hold footpedal to align the robot
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | Clinician engages interlock (footpedal in scanner room) to enable robot motion. Robot will only move when interlock is engaged following a move command.  
+
| align="left" |Clinician engages interlock (footpedal in scanner room) to enable robot motion. Robot will only move when interlock is engaged following a move command.
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" | The robot moves to the target and streams its pose during motion
+
| align="left" |The robot moves to the target and streams its pose during motion
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
+
| align="left" |<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
| align="left" | Stream current robot pose in RAS coords as moving. Can also be requested (see below).
+
| align="left" |Stream current robot pose in RAS coords as moving. Can also be requested (see below).
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" |
 
| align="left" | << STATUS(MOVE_TO_TARGET, Code:??:??) <<
 
| align="left" | '''Code=OK:''' Robot reaches target <br> '''Code >= 3:''' Return error code when the device fails to move to the target. See [http://openigtlink.org/protocols/v2_status.html error list]
 
 
| align="left" |
 
| align="left" |
| align="left" |  
+
| align="left" |<< STATUS(MOVE_TO_TARGET, Code:??:??) <<
 +
| align="left" |'''Code=OK:''' Robot reaches target <br> '''Code >= 3:''' Return error code when the device fails to move to the target. See [http://openigtlink.org/protocols/v2_status.html error list]
 +
| align="left" |
 +
| align="left" |
 
|-
 
|-
| align="left" |  
+
| align="left" |
| align="left" | << TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
+
| align="left" |<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
| align="left" | Push out final robot pose in RAS coords as moving. (same format as previous stream - ensures last one is at final position)
+
| align="left" |Push out final robot pose in RAS coords as moving. (same format as previous stream - ensures last one is at final position)
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
| align="left" | Display the current final robot position at the target.
+
| align="left" |Display the current final robot position at the target.
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
| align="left" |  
+
| align="left" |
 
|-
 
|-
 +
|}
 +
 +
 +
==Diagram (Slicer - MRI)==
 +
<span style="color:#800000"></span>
 +
 +
{| border="1" cellpadding="5" cellspacing="0" align="center"
 +
|-
 +
| align="left style=" background:#e0e0e0;" |''3D Slicer (operator)''
 +
| align="left style=" background:#e0e0e0;" |''Message''
 +
| align="left style=" background:#e0e0e0;" |''MRI''
 +
| align="left style=" background:#e0e0e0;" |''Surgeon''
 +
| align="left style=" background:#e0e0e0;" |''Note''
 +
|-
 +
| colspan="5" align="center" style="background:#f0f0f0;" |Start-up
 +
|-
 +
| align="left" |The operator presses "Start-up" button
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |Send command to MRI
 +
| align="left" |>> STRING(CMD_XXXX, START_UP) >>
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 +
|-
 +
| align="left" |
 +
| align="left" |<< STRING(ACK_XXXX, START_UP) <<
 +
| align="left" |Echo back an acknowledgement command was received, but not yet completed
 +
| align="left" |
 +
| align="left" |XXXX is the same unique query ID as the START_UP message.
 +
|-
 +
| align="left" style="background:#f8f8f8;" |
 +
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
 +
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the MRI is in SCAN_READY mode. Phase should be "SCAN_READY". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
 +
| align="left" style="background:#f8f8f8;;" |
 +
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 +
|-
 +
| align="left" |
 +
| align="left" |<< TRANSFORM(ACK_XXXXX, 4x4 target matrix) <<
 +
| align="left" |Send the current scan position to Slicer
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| colspan="5" align="center" style="background:#f0f0f0;" |Update Scan Target
 +
|-
 +
| align="left" |The operator presses "Update scan target" button
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |Send transform representing updated scan target to MRI if the MRI current status is SCAN_READY
 +
| align="left" |>> TRANSFORM(TGT_XXXXX, 4x4 scan target matrix in RAS coordinates) >>
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |
 +
| align="left" |<< TRANSFORM(ACK_XXXXX, 4x4 target matrix) <<
 +
| align="left" |Acknowledge receipt of target transformation by echoing back
 +
| align="left" |
 +
| align="left" |XXXX is the same unique query ID as the TARGETING message.
 +
|-
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |Calculate if the scanning target defined by the transformation received from Slicer is possible to achieve. <br /> Move scanner to the target if accepted.
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |
 +
| align="left" |<< STATUS(TARGET, Code:??:??) <<
 +
| align="left" |'''Code=OK:''' Reply with OK if scanning target was accepted and MRI moved to scanning target <br />'''Code=DNR:''' MRI did not successfully move to scanning target <br /> '''Code=CE:''' Not a valid target (i.e. out of workspace)
 +
| align="left" |
 +
| align="left" |DNR: Device Not Ready (code 13) <br> CE: Configuration Error (code 10)
 +
|-
 +
| colspan="5" align="center" style="background:#f0f0f0;" |Get Current Target
 +
|-
 +
| align="left" |The operator presses "Get current target" button
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |Send command to MRI
 +
| align="left" |>> STRING(CMD_XXXX, GET_TARGET) >>
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 +
|-
 +
| colspan="5" align="center" style="background:#f0f0f0;" |Start Scan
 +
|-
 +
| align="left" |The operator presses "Start scan" button
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| colspan="5" align="center" style="background:#f0f0f0;" |Stop Scan
 +
|-
 +
| align="left" |The operator presses "Stop scan" button
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
 
|}
 
|}
  
Line 626: Line 749:
 
Simulator software for QA will be hosted in https://github.com/ProstateBRP.  
 
Simulator software for QA will be hosted in https://github.com/ProstateBRP.  
 
The following tests are described as pseudo code for navigation software.
 
The following tests are described as pseudo code for navigation software.
 
 
===Test 1: Normal Operation Test===
 
===Test 1: Normal Operation Test===
<font color=red>Updated on 9/10/13</font>
+
<font color="red">Updated on 9/10/13</font>
 
 
 
  # Step 1
 
  # Step 1
 
  send STRING(CMD, START_UP)
 
  send STRING(CMD, START_UP)
Line 668: Line 789:
 
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
 
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
 
  if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure  # Check point 5.2
 
  if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure  # Check point 5.2
 
+
 
  if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
 
  if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
 
  if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.4
 
  if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.4
Line 679: Line 800:
 
  if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure  # Check point 6.2
 
  if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure  # Check point 6.2
 
  if (not receive STATUS(MANUAL, OK) within 10s) failure # Check point 6.3
 
  if (not receive STATUS(MANUAL, OK) within 10s) failure # Check point 6.3
 
+
 
  # Step 7  
 
  # Step 7  
 
  send GET_TRANSFORM(CURRENT_POSITION)
 
  send GET_TRANSFORM(CURRENT_POSITION)
Line 694: Line 815:
 
  if (not receive STATUS(CURRENT_STATUS, OK,0,STOP) within 100ms) failure  # Check point 9.2
 
  if (not receive STATUS(CURRENT_STATUS, OK,0,STOP) within 100ms) failure  # Check point 9.2
 
  if (not receive STATUS(STOP, OK) within 10s) failure # Check point 9.3
 
  if (not receive STATUS(STOP, OK) within 10s) failure # Check point 9.3
 
+
 
  # Step 10
 
  # Step 10
 
  send STRING(CMD, EMERGENCY)
 
  send STRING(CMD, EMERGENCY)
Line 700: Line 821:
 
  if (not receive STATUS(CURRENT_STATUS, OK,0,EMERGENCY) within 100ms) failure  # Check point 10.2
 
  if (not receive STATUS(CURRENT_STATUS, OK,0,EMERGENCY) within 100ms) failure  # Check point 10.2
 
  if (not receive STATUS(EMERGENCY, Emergency) within 10s) failure # Check point 10.3
 
  if (not receive STATUS(EMERGENCY, Emergency) within 10s) failure # Check point 10.3
 
 
This is implemented in:
 
This is implemented in:
 
https://github.com/ProstateBRP/CommunicationTest/blob/master/ClientNormalOperationTest.cxx
 
https://github.com/ProstateBRP/CommunicationTest/blob/master/ClientNormalOperationTest.cxx
 
 
===Test 2: Start-up without connecting the device to the robot control computer===
 
===Test 2: Start-up without connecting the device to the robot control computer===
 +
<font color="red">Updated on 9/10/13</font>
 
Check if the robot control software returns a proper error code if there is any trouble with the hardware. Before start, unplug one of the sensors or actuators from the robot control computer. The test must be repeated for all sensors and actuators.
 
Check if the robot control software returns a proper error code if there is any trouble with the hardware. Before start, unplug one of the sensors or actuators from the robot control computer. The test must be repeated for all sensors and actuators.
 
 
  # Step 1
 
  # Step 1
 
  send STRING(CMD, START-UP)
 
  send STRING(CMD, START-UP)
 
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point 1.1
 
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point 1.1
  if (not receive STATUS(DNP) within 10s) failure # Check point 1.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure  # Check point 1.2
 
+
  if (not receive STATUS(DNP) within 10s) failure # Check point 1.3
 
DNP: Device Not Present (code 16)
 
DNP: Device Not Present (code 16)
 
 
===Test 3: Calibration error test===
 
===Test 3: Calibration error test===
 +
<font color="red">Updated on 9/10/13</font>
 
Check if the robot control software returns a proper error code if the calibration matrix is not valid e.g. non-orthogonal matrix.  
 
Check if the robot control software returns a proper error code if the calibration matrix is not valid e.g. non-orthogonal matrix.  
 
 
  # Step 1
 
  # Step 1
 
  send STRING(CMD, START_UP)
 
  send STRING(CMD, START_UP)
 
  if (not receive STRING(ACK, START_UP) within 100ms) failure  # Check point 1.1
 
  if (not receive STRING(ACK, START_UP) within 100ms) failure  # Check point 1.1
  if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure  # Check point 1.2
 +
  if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3
 
   
 
   
 
  # Step 2
 
  # Step 2
 
  send STRING(CMD, PLANNING)
 
  send STRING(CMD, PLANNING)
 
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure  # Check point 2.2
 
   
 
   
 
  # Step 3
 
  # Step 3
 
  send STRING(CMD, CALIBRATION)
 
  send STRING(CMD, CALIBRATION)
 
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure  # Check point 3.2
 
   
 
   
 
  send TRANSFORM(CLB, invalid_matrix)
 
  send TRANSFORM(CLB, invalid_matrix)
  if (not receive TRANSFORM(ACK, invalid_matrix) within 100ms) failure # Check point 3.2
+
  if (not receive TRANSFORM(ACK, invalid_matrix) within 100ms) failure # Check point 3.3
  if (not receive STATUS(CALIBRATION, CE) within 10s) failure # Check point 3.3
+
  if (not receive STATUS(CALIBRATION, CE) within 10s) failure # Check point 3.4
 
 
 
CE: Configuration error (code 10). Example of non-orthoganl 4x4 matrix is (1.0, 1.0, 1.0, 1.0; 1.0, 1.0, 1.0, 1.0; 1.0, 1.0, 1.0, 1.0; 1.0, 1.0, 1.0, 1.0)
 
CE: Configuration error (code 10). Example of non-orthoganl 4x4 matrix is (1.0, 1.0, 1.0, 1.0; 1.0, 1.0, 1.0, 1.0; 1.0, 1.0, 1.0, 1.0; 1.0, 1.0, 1.0, 1.0)
 
 
===Test 4: Targeting without calibration test===
 
===Test 4: Targeting without calibration test===
 +
<font color="red">Updated on 9/10</font>
 
Check if the robot control software returns a proper error code if the user attempts to run targeting before sending calibration matrix
 
Check if the robot control software returns a proper error code if the user attempts to run targeting before sending calibration matrix
 
 
  # Step 1
 
  # Step 1
 
  send STRING(CMD, START-UP)
 
  send STRING(CMD, START-UP)
 
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point 1.1
 
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point 1.1
  if (not receive STATUS(OK) within 10s) failure # Check point 1.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,START-UP) within 100ms) failure  # Check point 1.2
 +
  if (not receive STATUS(OK) within 10s) failure # Check point 1.3
 
    
 
    
 
  # Step 2
 
  # Step 2
 
  send STRING(CMD, PLANNING)  
 
  send STRING(CMD, PLANNING)  
 
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure  # Check point 2.2
 
   
 
   
 
  # Step 3
 
  # Step 3
 
  send STRING(CMD, CALIBRATION)
 
  send STRING(CMD, CALIBRATION)
 
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure  # Check point 3.2
 
   
 
   
 
  # Step 4
 
  # Step 4
 
  send STRING(CMD, TARGETING)
 
  send STRING(CMD, TARGETING)
 
  if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
 
  if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
  if (not receive STATUS(TARGETING, DNR) within 10s) failure # Check point 4.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure  # Check point 4.2
 
+
  if (not receive STATUS(TARGETING, DNR) within 10s) failure # Check point 4.3
 
DNR: Device not ready (code 13)
 
DNR: Device not ready (code 13)
 
 
===Test 5: Out of range test===
 
===Test 5: Out of range test===
 +
<font color="red">Updated on 9/10/13</font>
 
Check if the robot control software returns a proper error code if a target outside of its workspace is given. Assume target described by matrix3 in the image coordinate system is out of the range for the robot registered to the image coordinate system using matrix 1.
 
Check if the robot control software returns a proper error code if a target outside of its workspace is given. Assume target described by matrix3 in the image coordinate system is out of the range for the robot registered to the image coordinate system using matrix 1.
 
 
  # Step 1
 
  # Step 1
 
  send STRING(CMD, START-UP)
 
  send STRING(CMD, START-UP)
 
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point #1.1
 
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point #1.1
  if (not receive STATUS(OK) within 10s) failure  # Check point #1.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,START-UP) within 100ms) failure  # Check point 1.2
 +
  if (not receive STATUS(OK) within 10s) failure  # Check point #1.3
 
   
 
   
 
  # Step 2
 
  # Step 2
 
  send STRING(CMD, PLANNING)
 
  send STRING(CMD, PLANNING)
 
  if (not receive STRING(ACK, PLANNING) within 100ms) failure  # Check point #2.1
 
  if (not receive STRING(ACK, PLANNING) within 100ms) failure  # Check point #2.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure  # Check point 2.2
 
   
 
   
 
  # Step 3  
 
  # Step 3  
 
  send STRING(CMD, CALIBRATION)
 
  send STRING(CMD, CALIBRATION)
 
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure  # Check point #3.1
 
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure  # Check point #3.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure  # Check point 3.2
 
   
 
   
 
  send TRANSFORM(CLB, matrix1)
 
  send TRANSFORM(CLB, matrix1)
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure  # Check point #3.2
+
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure  # Check point #3.3
  if (matrix1 != matrix2) failure  # Check point #3.3
+
  if (matrix1 != matrix2) failure  # Check point #3.4
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure  # Check point #3.4
+
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure  # Check point #3.5
 
   
 
   
 
  # Step 4
 
  # Step 4
 
  send STRING(CMD, TARGETING)
 
  send STRING(CMD, TARGETING)
 
  if (not receive STRING(ACK, TARGETING) within 100ms) failure  # Check point #4.1
 
  if (not receive STRING(ACK, TARGETING) within 100ms) failure  # Check point #4.1
  if (not receive STATUS(TARGETING, OK) within 10s) failure  # Check point #4.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure  # Check point 4.2
 +
  if (not receive STATUS(TARGETING, OK) within 10s) failure  # Check point #4.3
 
   
 
   
 
  send TRANSFORM(TGT, matrix3)
 
  send TRANSFORM(TGT, matrix3)
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure  # Check point #4.3
+
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure  # Check point #4.4
  if (matrix3 != matrix4) failure  # Check point #4.4
+
  if (matrix3 != matrix4) failure  # Check point #4.5
  if (not receive STATUS(TARGET, CE) within 10s) failure  # Check point #4.5
+
  if (not receive STATUS(TARGET, CE) within 10s) failure  # Check point #4.6
 
 
 
CE: Configuration error (code 10)
 
CE: Configuration error (code 10)
 
 
===Test 6: Stop during operation test===
 
===Test 6: Stop during operation test===
 +
<font color="red">Updated on 9/10/13</font>
 
Check if the robot stops when the STOP command is sent to the robot while the robot is moving.
 
Check if the robot stops when the STOP command is sent to the robot while the robot is moving.
 
 
  # Step 1
 
  # Step 1
  send STRING(CMD, START-UP)
+
  send STRING(CMD, START_UP)
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point #1.1
+
  if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
  if (not receive STATUS(OK) within 10s) failure # Check point #1.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure  # Check point 1.2
 +
  if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3
 
   
 
   
 
  # Step 2
 
  # Step 2
 
  send STRING(CMD, PLANNING)
 
  send STRING(CMD, PLANNING)
  if (not receive STRING(ACK, PLANNING) within 100ms) failure  # Check point #2.1
+
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 +
  if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure  # Check point 2.2
 
   
 
   
 
  # Step 3
 
  # Step 3
  send STRING(CMD, CALIBRATION)  
+
  send STRING(CMD, CALIBRATION)
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure  # Check point #3.1
+
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure  # Check point 3.2
 
   
 
   
 
  send TRANSFORM(CLB, matrix1)
 
  send TRANSFORM(CLB, matrix1)
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure   # Check point #3.2
+
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
  if (matrix1 != matrix2) failure   # Check point #3.3
+
  if (matrix1 != matrix2) failure # Check point 3.4
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure   # Check point #3.4
+
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5
 
   
 
   
 
  # Step 4
 
  # Step 4
 
  send STRING(CMD, TARGETING)
 
  send STRING(CMD, TARGETING)
  if (not receive STRING(ACK, TARGETING) within 100ms) failure #Check point #4.1
+
  if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
  if (not receive STATUS(TARGETING, OK) within 10s) failure #Check point #4.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure  # Check point 4.2
 +
  if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3
 
   
 
   
 
  send TRANSFORM(TGT, matrix3)
 
  send TRANSFORM(TGT, matrix3)
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure #Check point #4.3
+
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.4
  if (matrix3 != matrix4) failure  #Check point #4.4
+
  if (matrix3 != matrix4) failure  # Check point 4.5
  if (not receive STATUS(TARGET, OK) within 10s) failure #Check point #4.5
+
  if (not receive STATUS(TARGET, OK) within 10s) failure # Check point 4.6
  if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure #Check point #4.6
+
  if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure # Check point 4.7
  if (matrix3 != matrix5) failure #Check point #4.7
+
  if (matrix3 != matrix5) failure # Check point 4.8
 
   
 
   
 
  # Step 5
 
  # Step 5
 
  send STRING(CMD, MOVE_TO_TARGET)
 
  send STRING(CMD, MOVE_TO_TARGET)
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure #Check point #5.1
+
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
  if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure #Check point #5.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure  # Check point 5.2
 +
 +
  if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
 +
if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.4
 +
if (not receive TRANSFORM(CURRENT_POSITION, matrix 7) within 100ms after the status message is received) failure # Check point 5.5
 +
if (matrix 7 does not match the current position of the robot) failure # Check point 5.6
 
   
 
   
 
  # Step 6
 
  # Step 6
Line 834: Line 966:
 
  send STRING(CMD, STOP) before receiving STATUS(MOVE_TO_TARGET, OK)  
 
  send STRING(CMD, STOP) before receiving STATUS(MOVE_TO_TARGET, OK)  
 
  if (not receive STRING(ACK, STOP) within 100ms) failure  #Check point #6.1
 
  if (not receive STRING(ACK, STOP) within 100ms) failure  #Check point #6.1
  if (not receive STATUS(STOP, OK) within 200ms) failure  #Check point #6.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,STOP) within 100ms) failure  # Check point 6.2
 
+
  if (not receive STATUS(STOP, OK) within 200ms) failure  #Check point #6.3
 
The test fails if the robot does not stop within 200ms after sending STRING(CMD, STOP).
 
The test fails if the robot does not stop within 200ms after sending STRING(CMD, STOP).
 
 
===Test 7: Emergency stop during operation test===
 
===Test 7: Emergency stop during operation test===
 +
<font color="red">Updated on 9/10/13</font>
 
Check if the robot stops when the EMERGENCY command is sent to the robot while the robot is moving.
 
Check if the robot stops when the EMERGENCY command is sent to the robot while the robot is moving.
 +
  
 
  # Step 1
 
  # Step 1
  send STRING(CMD, START-UP)
+
  send STRING(CMD, START_UP)
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point #1.1
+
  if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
  if (not receive STATUS(OK) within 10s) failure # Check point #1.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure  # Check point 1.2
 +
  if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3
 
   
 
   
 
  # Step 2
 
  # Step 2
 
  send STRING(CMD, PLANNING)
 
  send STRING(CMD, PLANNING)
  if (not receive STRING(ACK, PLANNING) within 100ms) failure  # Check point #2.1
+
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 +
  if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure  # Check point 2.2
 
   
 
   
 
  # Step 3
 
  # Step 3
 
  send STRING(CMD, CALIBRATION)
 
  send STRING(CMD, CALIBRATION)
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure  # Check point #3.1
+
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 +
  if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure  # Check point 3.2
 
   
 
   
 
  send TRANSFORM(CLB, matrix1)
 
  send TRANSFORM(CLB, matrix1)
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure   # Check point #3.2
+
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
  if (matrix1 != matrix2) failure   # Check point #3.3
+
  if (matrix1 != matrix2) failure # Check point 3.4
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure # Check point #3.4
+
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5
 
   
 
   
 
  # Step 4
 
  # Step 4
 
  send STRING(CMD, TARGETING)
 
  send STRING(CMD, TARGETING)
  if (not receive STRING(ACK, TARGETING) within 100ms) failure  # Check point #4.1
+
  if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
  if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point #4.2
+
  if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure  # Check point 4.2
 +
  if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3
 
   
 
   
 
  send TRANSFORM(TGT, matrix3)
 
  send TRANSFORM(TGT, matrix3)
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point #4.3
+
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.4
  if (matrix3 != matrix4) failure  # Check point #4.4
+
  if (matrix3 != matrix4) failure  # Check point 4.5
  if (not receive STATUS(TARGET, OK) within 10s) failure  # Check point #4.5
+
  if (not receive STATUS(TARGET, OK) within 10s) failure  # Check point 4.6
  if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure  # Check point #4.6
+
  if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure  # Check point 4.7
  if (matrix3 != matrix5) failure  # Check point #4.7
+
  if (matrix3 != matrix5) failure  # Check point 4.8
 
   
 
   
 
  # Step 5
 
  # Step 5
 
  send STRING(CMD, MOVE_TO_TARGET)
 
  send STRING(CMD, MOVE_TO_TARGET)
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure  # Check point #5.1
+
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
  if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure  # Check point #5.2
+
  if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure  # Check point 5.2
 +
 +
  if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
 +
  if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.4
 +
if (not receive TRANSFORM(CURRENT_POSITION, matrix 7) within 100ms after the status message is received) failure # Check point 5.5
 +
if (matrix 7 does not match the current position of the robot) failure # Check point 5.6
 
   
 
   
 
  # Step 6
 
  # Step 6
Line 880: Line 1,022:
 
  send STRING(CMD, EMERGENCY) before receiving STATUS(MOVE_TO_TARGET, OK)  
 
  send STRING(CMD, EMERGENCY) before receiving STATUS(MOVE_TO_TARGET, OK)  
 
  if (not receive STRING(ACK, EMERGENCY) within 100ms) failure  # Check point #6.1
 
  if (not receive STRING(ACK, EMERGENCY) within 100ms) failure  # Check point #6.1
  if (not receive STATUS(STOP, EMERGENCY) within 200ms) failure  # Check point #6.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,EMERGENCY) within 100ms) failure  # Check point 6.2
 
+
  if (not receive STATUS(STOP, EMERGENCY) within 200ms) failure  # Check point #6.3
 
The test fails if the robot does not completely shutdown within 200ms after sending STRING(CMD, EMERGENCY).
 
The test fails if the robot does not completely shutdown within 200ms after sending STRING(CMD, EMERGENCY).
 
+
===Test 8: MOVE_TO_TARGET without sending target===
===Test 8: MOVE_TO_TARGET without sending target ===
+
<font color="red">Updated on 9/10/13</font>
 
+
  # Step 1
  #Step 1
+
  send STRING(CMD, START_UP)
  send STRING(CMD, START-UP)
+
  if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
  if (not receive STRING(ACK, START_UP) within 100ms) failure # Check point #1.1
+
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure  # Check point 1.2
  if (not receive STATUS(START_UP, OK) within 10s) failure # Check point #1.2
+
  if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3
 
   
 
   
  #Step 2
+
  # Step 2
 
  send STRING(CMD, PLANNING)
 
  send STRING(CMD, PLANNING)
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point #2.1
+
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure  # Check point 2.2
 
   
 
   
  #Step 3
+
  # Step 3
 
  send STRING(CMD, CALIBRATION)
 
  send STRING(CMD, CALIBRATION)
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point #3.1
+
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure  # Check point 3.2
 
   
 
   
 
  send TRANSFORM(CLB, matrix1)
 
  send TRANSFORM(CLB, matrix1)
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point #3.2
+
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
  if (matrix1 != matrix2) failure # Check point #3.3
+
  if (matrix1 != matrix2) failure # Check point 3.4
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure # Check point #3.4
+
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5
 
   
 
   
  #Step 4
+
  # Step 4
 
  send STRING(CMD, TARGETING)
 
  send STRING(CMD, TARGETING)
  if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point #4.1
+
  if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
  if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point #4.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure  # Check point 4.2
 +
  if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3
 
   
 
   
  #Step 5
+
  # Step 5
 
  send STRING(CMD, MOVE_TO_TARGET)
 
  send STRING(CMD, MOVE_TO_TARGET)
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point #5.1
+
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
  if (not receive STATUS(MOVE_TO_TARGET, DNR) within 100ms after the robot reaches the target) failure # Check point #5.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure  # Check point 5.2
 
+
  if (not receive STATUS(MOVE_TO_TARGET, DNR) within 100ms after the robot reaches the target) failure # Check point #5.3
 
===Test 9: Accidental target/move_to command during manual mode===
 
===Test 9: Accidental target/move_to command during manual mode===
 
+
<font color="red">Updated on 9/10/13</font>
 
  # Step 1
 
  # Step 1
  send STRING(CMD, START-UP)
+
  send STRING(CMD, START_UP)
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point 1.1
+
  if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
  if (not receive STATUS(OK) within 10s) failure # Check point 1.2
+
  if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure  # Check point 1.2
 +
if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3
 
   
 
   
 
  # Step 2
 
  # Step 2
 
  send STRING(CMD, PLANNING)
 
  send STRING(CMD, PLANNING)
 
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure  # Check point 2.2
 
   
 
   
 
  # Step 3
 
  # Step 3
 
  send STRING(CMD, CALIBRATION)
 
  send STRING(CMD, CALIBRATION)
 
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure  # Check point 3.2
 
   
 
   
 
  send TRANSFORM(CLB, matrix1)
 
  send TRANSFORM(CLB, matrix1)
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.2
+
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
  if (matrix1 != matrix2) failure # Check point 3.3
+
  if (matrix1 != matrix2) failure # Check point 3.4
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure # Check point 3.4
+
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5
 
   
 
   
 
  # Step 4
 
  # Step 4
 
  send STRING(CMD, TARGETING)
 
  send STRING(CMD, TARGETING)
 
  if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
 
  if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
  if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure  # Check point 4.2
 +
  if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3
 
   
 
   
 
  send TRANSFORM(TGT, matrix3)
 
  send TRANSFORM(TGT, matrix3)
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.3
+
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.4
  if (matrix3 != matrix4) failure # Check point 4.4
+
  if (matrix3 != matrix4) failure # Check point 4.5
  if (not receive STATUS(TARGET, OK) within 10s) failure # Check point 4.5
+
  if (not receive STATUS(TARGET, OK) within 10s) failure # Check point 4.6
  if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure # Check point 4.6
+
  if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure # Check point 4.7
  if (matrix3 != matrix5) failure # Check point 4.7
+
  if (matrix3 != matrix5) failure # Check point 4.8
 
   
 
   
 
  # Step 5
 
  # Step 5
 
  send STRING(CMD, MOVE_TO_TARGET)
 
  send STRING(CMD, MOVE_TO_TARGET)
 
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
 
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
  if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure  # Check point 5.2
  if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.3
+
  if (not receive TRANSFORM(CURRENT_POSITION, matrix 7) within 100ms after the status message is received) failure # Check point 5.4
+
  if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
  if (matrix 7 does not match the current position of the robot) failure # Check point 5.5
+
  if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.4
 +
  if (not receive TRANSFORM(CURRENT_POSITION, matrix 7) within 100ms after the status message is received) failure # Check point 5.5
 +
  if (matrix 7 does not match the current position of the robot) failure # Check point 5.6
 
   
 
   
 
  # Step 6
 
  # Step 6
 
  send STRING(CMD, MANUAL)
 
  send STRING(CMD, MANUAL)
 
  if (not receive STRING(ACK, MANUAL) within 100ms) failure # Check point 6.1
 
  if (not receive STRING(ACK, MANUAL) within 100ms) failure # Check point 6.1
  if (not receive STATUS(MANUAL, OK) within 10s) failure # Check point 6.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,MANUAL) within 100ms) failure  # Check point 6.2
 +
  if (not receive STATUS(MANUAL, OK) within 10s) failure # Check point 6.3
 
   
 
   
 
  # Step 7
 
  # Step 7
 
  send STRING(CMD, MOVE_TO_TARGET)
 
  send STRING(CMD, MOVE_TO_TARGET)
 
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 7.1
 
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 7.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,MANUAL) within 100ms) failure  # Check point 6.2
 
  if (not receive STATUS(MOVE_TO_TARGET, DNR) within 100ms after the robot reaches the target) failure # Check point 7.2
 
  if (not receive STATUS(MOVE_TO_TARGET, DNR) within 100ms after the robot reaches the target) failure # Check point 7.2
 
 
The test fails if the robot starts moving.
 
The test fails if the robot starts moving.
 
 
===Test 10: Hardware error during operation===
 
===Test 10: Hardware error during operation===
 +
<font color="red">Updated on 9/10/13</font>
 
Unplug one of motors/encoders while the robot is moving to the target.
 
Unplug one of motors/encoders while the robot is moving to the target.
 
 
  # Step 1
 
  # Step 1
  send STRING(CMD, START-UP)
+
  send STRING(CMD, START_UP)
  if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point #1.1
+
  if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
  if (not receive STATUS(OK) within 10s) failure failure # Check point #1.2
+
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure  # Check point 1.2
 +
  if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3
 
   
 
   
 
  # Step 2
 
  # Step 2
 
  send STRING(CMD, PLANNING)
 
  send STRING(CMD, PLANNING)
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point #2.1
+
  if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
 +
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure  # Check point 2.2
 
   
 
   
 
  # Step 3
 
  # Step 3
 
  send STRING(CMD, CALIBRATION)
 
  send STRING(CMD, CALIBRATION)
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure  # Check point #3.1
+
  if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
 +
  if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure  # Check point 3.2
 
   
 
   
 
  send TRANSFORM(CLB, matrix1)
 
  send TRANSFORM(CLB, matrix1)
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point #3.2
+
  if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
  if (matrix1 != matrix2) failure # Check point #3.3
+
  if (matrix1 != matrix2) failure # Check point 3.4
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure # Check point #3.4
+
  if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5
 
   
 
   
 
  # Step 4
 
  # Step 4
 
  send STRING(CMD, TARGETING)
 
  send STRING(CMD, TARGETING)
  if (not receive STRING(ACK, TARGETING) within 100ms) failure  # Check point #4.1
+
  if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
  if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point #4.2
+
  if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure  # Check point 4.2
 +
  if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3
 
   
 
   
 
  send TRANSFORM(TGT, matrix3)
 
  send TRANSFORM(TGT, matrix3)
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point #4.3
+
  if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.4
  if (matrix3 != matrix4) failure  # Check point #4.4
+
  if (matrix3 != matrix4) failure  # Check point 4.5
  if (not receive STATUS(TARGET, OK) within 10s) failure  # Check point #4.5
+
  if (not receive STATUS(TARGET, OK) within 10s) failure  # Check point 4.6
  if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure  # Check point #4.6
+
  if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure  # Check point 4.7
  if (matrix3 != matrix5) failure  # Check point #4.7
+
  if (matrix3 != matrix5) failure  # Check point 4.8
 
   
 
   
 
  # Step 5
 
  # Step 5
 
  send STRING(CMD, MOVE_TO_TARGET)
 
  send STRING(CMD, MOVE_TO_TARGET)
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point #5.1
+
  if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
  if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point #5.2
+
  if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure   # Check point 5.2
 
   
 
   
 +
if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
 +
 
 
While the robot is moving to the target, unplug one of the cables for the actuators or the sensors
 
While the robot is moving to the target, unplug one of the cables for the actuators or the sensors
 
 
  # Step 6
 
  # Step 6
 
  if (not receive STATUS(MOVE_TO_TARGET, 19) within 100ms) failure  # Check point #6.1
 
  if (not receive STATUS(MOVE_TO_TARGET, 19) within 100ms) failure  # Check point #6.1
 +
{| border="1" cellpadding="5" cellspacing="0" align="center"
 +
|-
 +
| align="left style=" background:#e0e0e0;" |''3D Slicer (operator)''
 +
| align="left style=" background:#e0e0e0;" |''Message''
 +
| align="left style=" background:#e0e0e0;" |''MRI''
 +
| align="left style=" background:#e0e0e0;" |''Radiologist''
 +
| align="left style=" background:#e0e0e0;" |''Note''
 +
|-
 +
| colspan="5" align="center" style="background:#f0f0f0;" |Start-up
 +
|-
 +
| align="left" |The operator presses "Start-up" button
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |Send command to robot
 +
| align="left" |>> STRING(CMD_XXXX, START_UP) >>
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
 +
|-
 +
| align="left" |
 +
| align="left" |<< STRING(ACK_XXXX, START_UP) <<
 +
| align="left" |Echo back an acknowledgement command was received, but not yet completed
 +
| align="left" |
 +
| align="left" |XXXX is the same unique query ID as the START_UP message.
 +
|-
 +
| align="left" style="background:#f8f8f8;" |
 +
| align="left" style="background:#f8f8f8;;" |<< STATUS(CURRENT_STATUS, Code:0:Phase) <<
 +
| align="left" style="background:#f8f8f8;;" |'''Code=OK:''' Confirm that the robot is transition to START_UP mode. Phase should be "START_UP". ''Code=DNR:'' Fails to transition. Phase should be the name of the current workphase
 +
| align="left" style="background:#f8f8f8;;" |
 +
| align="left" style="background:#f8f8f8;;" |DNR: Device not ready (13)
 +
|-
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |Start up and initialize the hardware. Run the robot homing procedure if necessary (skip if already successfully completed). Move robot to home (loading) configuration.
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |
 +
| align="left" |<< STATUS(START_UP, Code:??:??) <<
 +
| align="left" |'''Code=OK:''' Confirm when robot is initialized <br>'''Code>=2''': Error. See [http://openigtlink.org/protocols/v2_status.html error list]
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
| align="left" |Display the result of start up process.
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
| align="left" |
 +
|-
 +
 +
|}

Latest revision as of 22:13, 13 January 2022

Home < ProstateBRP OpenIGTLink Communication June 2013

The following table shows message exchange diagram for the communication between 3D Slicer (and other navigation software) and the robot in each workhpase.

Notations

Diagram (Slicer - Robot)

3D Slicer (operator) Message Robot Controller Radiologist Note
Start-up
The operator presses "Start-up" button
Send command to robot >> STRING(CMD_XXXX, START_UP) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, START_UP) << Echo back an acknowledgement command was received, but not yet completed XXXX is the same unique query ID as the START_UP message.
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the robot is transition to START_UP mode. Phase should be "START_UP". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
Start up and initialize the hardware. Run the robot homing procedure if necessary (skip if already successfully completed). Move robot to home (loading) configuration.
<< STATUS(START_UP, Code:??:??) << Code=OK: Confirm when robot is initialized
Code>=2: Error. See error list
Display the result of start up process.
Planning
The operator opens the planning panel
>> STRING(CMD_XXXX, PLANNING) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, PLANNING) << Echo back an acknowledgement command was received XXXX is the same unique query ID as the PLANNING message.
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the robot is transition to PLANNING mode. Phase should be "PLANNING". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
Do nothing except keep track of current state, robot is awaiting next workphase.
Show that the robot is in PLANNING phase.
Calibration
The operator opens the calibration panel
>> STRING(CMD_XXXX, CALIBRATION) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, CALIBRATION) << Echo back an acknowledgement command was received XXXX is the same unique query ID as the CALIBRATION message.
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the robot is transition to CALIBRATION mode. Phase should be "CALIBRATION". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
Do nothing except keep track of current state, robot is awaiting calibration transform
Show that the robot is in CALIBRATION phase.
Nav Software (3D Slicer or RadVision) calculates calibration matrix
>> TRANSFORM(CLB_XXXX, 4x4 calibration matrix in RAS coordinates) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< TRANSFORM(ACK_XXXX, Calibration matrix in RAS coordinates) << Echo back an acknowledgement transform was received XXXX is the same unique query ID as the CLB message.
Update calibration transform, set flag that registration has been set externally, reply with confirmation
<< STATUS(CALIBRATION, Code:??:??) << Code=OK: Confirm that calibration was received and robot is ready for next workphase
Code=CE: Error.
CE: Configuration Error (code 10)
Show that calibration successfully sent to robot or failed.
Targeting
The operator enters "Targeting" mode
>> STRING(CMD_XXXX, TARGETING) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, TARGETING) << Acknowledge receiving targeting command XXXX is the same unique query ID as the TARGETING message.
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the robot is transition to TARGETING mode. Phase should be "TARGETING". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
Confirm if robot is ready for targeting; check if calibration was received; return robot to home (loading) position, if needed.
<< STATUS(TARGETING, Code:??:??) << Code=OK: Confirm robot has entered targeting mode.
Code=DNR: If not able to enter targeting mode (i.e. calibration not received)
DNR: Device Not Ready (code 13)
The operator select a target, Nav software creates a 4x4 matrix for desired 6-DOF robot pose to reach the target
>> TRANSFORM(TGT_XXXXX, 4x4 target matrix in RAS coordinates) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes). The unique ID may be used as a human-readable target name on the robot control software. For example, TGT_LeftApex-2 is for the second targeting attempt on a lesion in the left-apex.
<< TRANSFORM(ACK_XXXXX, 4x4 target matrix) << Acknowledge receipt of target transformation by echoing back XXXX is the same unique query ID as the TARGETING message.
Calculate if target pose is reachable based on the kinematics, reply with status and set target
<< STATUS(TARGET, Code:??:??) << Code=OK: Reply with OK if target was accepted
Code=DNR: Not in targeting mode
Code=CE: Not a valid target (i.e. out of workspace)
DNR: Device Not Ready (code 13)
CE: Configuration Error (code 10)
<< TRANSFORM(TARGET, 4x4 target matrix) << Send actual target pose in robot controller if one was set (corresponds to when status comes back OK)
Display the reachable target position set in robot controller.
The operator confirms the target position set in the controller, and press "MOVE"
>> STRING(CMD_XXXX, MOVE_TO_TARGET) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, MOVE_TO_TARGET) << Echo back an acknowledgement command was received (not yet completed) XXXX is the same unique query ID as the MOVE_TO_TARGET message. See the note below
Alert the clinician to hold footpedal to align the robot Clinician engages interlock (footpedal in scanner room) to enable robot motion. Robot will only move when interlock is engaged following a move command.
The robot moves to the target and streams its pose during motion
<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) << Stream current robot pose in RAS coords as moving. Can also be requested (see below).
Display the current robot position as it moves toward the target.
Display that the robot is at the target. Send confirmation.
<< STATUS(MOVE_TO_TARGET, Code:??:??) << Code=OK: Robot reaches target
Code >= 3: Return error code when the device fails to move to the target. See error list
<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) << Push out final robot pose in RAS coords as moving. (same format as previous stream - ensures last one is at final position)
Display the current final robot position at the target.
Needle Insertion (Manual)
Ask to lock the robot
The operator presses "Lock" button
>> STRING (CMD_XXXX, MANUAL) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, MANUAL) << Echo back an acknowledgement command was received (not yet completed) XXXX is the same unique query ID as the MANUAL message.
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the robot is transition to MANUAL mode. Phase should be "MANUAL". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
Cut motor power to prevent motion of the robot base. This also eliminates causes of MR interference for insertion under live imaging.
<< STATUS(MANUAL, OK:??:??) << Reply with OK when robot is in a safe, locked state
Insert a needle, optionally under live MR imaging. Perform intervention with the needle (biopsy or seed placement).
Retract the needle
Ask to unlock the robot and confirm needle is retracted
The operator presses "Unlock"
Return to the TARGETING phase (Slicer sends STRING(ACK_XXXXX, TARGETING) )
All workhpases
The operator presses "Stop" button
>> STRING(CMD_XXXX, STOP) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, STOP) << Acknowledge receiving targeting command XXXX is the same unique query ID as the STOP message.
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the robot is transition to STOP mode. Phase should be "STOP". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
The robot stops all motion. Stays in current state/workphase.
<< STATUS(STOP, OK:??:??) << Reply with OK when robot stopped safely.
All workhpases
The operator presses "Emergency" button
>> STRING(CMD_XXXX, EMERGENCY) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, EMERGENCY) << Acknowledge receiving targeting command XXXX is the same unique query ID as the STOP message.
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the robot is transition to EMERGENCY mode. Phase should be "EMERGENCY". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
The robot stops all motion and disables/locks motors. Switches to Emergency state/workphase. ?? IS THIS THE DESIRED ACTION
<< STATUS(EMERGENCY, Emergency:??:??) << Reply with OK when robot stopped safely.
All workhpases
Request current robot pose (or target or calibration transforms)
>> GET_TRANSFORM(CURRENT_POSITION) >>
The robot transmits current pose ("CURRENT_POSITION") through IGTLink upon request. This also works for requesting "TARGET_POSITION" and "CALIBRATION" transforms stored in robot controller.
<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) <<
All workhpases
Request the robot status/workphase
>> GET_STATUS(CURRENT_STATUS) >> ?? CONFIRM COMMAND STRUCTURE FOR STATUS REQUEST
Sends current state/workphase. ?? SHOULD IT SEND OTHER INFO TOO
<< STATUS(CURRENT_STATUS, Code:0:Status) << Send status code. Status should be the name of the current status e.g. "TARGETING". Code is OK, when the robot is successfully determines its workphase. Otherwise, Code should be configuration error (10)
All workhpases
Robot controller sends errors or notifications through IGTLink. Transmitted asynchronously with error text in message body. To be used with limit events, hardware failures, invalid commands, etc.
<< STATUS(ERROR, Code:??:Error name) << | align="left" | Send status code. error list

NOTE: Suggested modification -- Agreed on 9/5/13

Although MOVE_TO_TARGET workphase is currently part of TARGETING, Nirav suggested to make MOVE_TO_TARGET phase an independent workhpase. If we agree, the MOVE_TO_TARGET workphase should be defined as follows:

3D Slicer (operator) Message Robot Controller Radiologist Note
Move to Target
The operator confirms the target position set in the controller, and press "MOVE"
>> STRING(CMD_XXXX, MOVE_TO_TARGET) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, MOVE_TO_TARGET) << Echo back an acknowledgement command was received (not yet completed) XXXX is the same unique query ID as the MOVE_TO_TARGET message. See the note below
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the robot is transition to MOVE_TO_TARGET mode. Phase should be "MOVE_TO_TARGET". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
Alert the clinician to hold footpedal to align the robot Clinician engages interlock (footpedal in scanner room) to enable robot motion. Robot will only move when interlock is engaged following a move command.
The robot moves to the target and streams its pose during motion
<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) << Stream current robot pose in RAS coords as moving. Can also be requested (see below).
<< STATUS(MOVE_TO_TARGET, Code:??:??) << Code=OK: Robot reaches target
Code >= 3: Return error code when the device fails to move to the target. See error list
<< TRANSFORM(CURRENT_POSITION, Current robot pose matrix in RAS coordinates) << Push out final robot pose in RAS coords as moving. (same format as previous stream - ensures last one is at final position)
Display the current final robot position at the target.


Diagram (Slicer - MRI)

3D Slicer (operator) Message MRI Surgeon Note
Start-up
The operator presses "Start-up" button
Send command to MRI >> STRING(CMD_XXXX, START_UP) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, START_UP) << Echo back an acknowledgement command was received, but not yet completed XXXX is the same unique query ID as the START_UP message.
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the MRI is in SCAN_READY mode. Phase should be "SCAN_READY". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
<< TRANSFORM(ACK_XXXXX, 4x4 target matrix) << Send the current scan position to Slicer
Update Scan Target
The operator presses "Update scan target" button
Send transform representing updated scan target to MRI if the MRI current status is SCAN_READY >> TRANSFORM(TGT_XXXXX, 4x4 scan target matrix in RAS coordinates) >>
<< TRANSFORM(ACK_XXXXX, 4x4 target matrix) << Acknowledge receipt of target transformation by echoing back XXXX is the same unique query ID as the TARGETING message.
Calculate if the scanning target defined by the transformation received from Slicer is possible to achieve.
Move scanner to the target if accepted.
<< STATUS(TARGET, Code:??:??) << Code=OK: Reply with OK if scanning target was accepted and MRI moved to scanning target
Code=DNR: MRI did not successfully move to scanning target
Code=CE: Not a valid target (i.e. out of workspace)
DNR: Device Not Ready (code 13)
CE: Configuration Error (code 10)
Get Current Target
The operator presses "Get current target" button
Send command to MRI >> STRING(CMD_XXXX, GET_TARGET) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
Start Scan
The operator presses "Start scan" button
Stop Scan
The operator presses "Stop scan" button

Quality Assurance Protocol

Simulator software for QA will be hosted in https://github.com/ProstateBRP. The following tests are described as pseudo code for navigation software.

Test 1: Normal Operation Test

Updated on 9/10/13

# Step 1
send STRING(CMD, START_UP)
if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3

# Step 2
send STRING(CMD, PLANNING)
if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure   # Check point 2.2

# Step 3
send STRING(CMD, CALIBRATION)
if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 3.2

send TRANSFORM(CLB, matrix1)
if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
if (matrix1 != matrix2) failure # Check point 3.4
if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5

# Step 4
send STRING(CMD, TARGETING)
if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure   # Check point 4.2
if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3

send TRANSFORM(TGT, matrix3)
if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.4
if (matrix3 != matrix4) failure  # Check point 4.5
if (not receive STATUS(TARGET, OK) within 10s) failure  # Check point 4.6
if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure  # Check point 4.7
if (matrix3 != matrix5) failure  # Check point 4.8

# Step 5
send STRING(CMD, MOVE_TO_TARGET)
if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure   # Check point 5.2

if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.4
if (not receive TRANSFORM(CURRENT_POSITION, matrix 7) within 100ms after the status message is received) failure # Check point 5.5
if (matrix 7 does not match the current position of the robot) failure # Check point 5.6

# Step 6
send STRING(CMD, MANUAL)
if (not receive STRING(ACK, MANUAL) within 100ms) failure # Check point 6.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure   # Check point 6.2
if (not receive STATUS(MANUAL, OK) within 10s) failure # Check point 6.3

# Step 7 
send GET_TRANSFORM(CURRENT_POSITION)
if (not receive TRANSFORM(CURRENT_POSITION, matrix8) within 10s) failure # Check point 7.1
if (matrix 8 does not match the current position of the robot) failure # Check point 7.2

# Step 8
send GET_STATUS(CURRENT_STATUS)
if (not receive STATUS(XXXXX, Code:??:??) within 10s) failure # Check point 8.1

# Step 9
send STRING(CMD, STOP)
if (not receive STRING(ACK, STOP) within 100ms) failure # Check point 9.1
if (not receive STATUS(CURRENT_STATUS, OK,0,STOP) within 100ms) failure   # Check point 9.2
if (not receive STATUS(STOP, OK) within 10s) failure # Check point 9.3

# Step 10
send STRING(CMD, EMERGENCY)
if (not receive STRING(ACK, EMERGENCY) within 100ms) failure # Check point 10.1
if (not receive STATUS(CURRENT_STATUS, OK,0,EMERGENCY) within 100ms) failure   # Check point 10.2
if (not receive STATUS(EMERGENCY, Emergency) within 10s) failure # Check point 10.3

This is implemented in: https://github.com/ProstateBRP/CommunicationTest/blob/master/ClientNormalOperationTest.cxx

Test 2: Start-up without connecting the device to the robot control computer

Updated on 9/10/13 Check if the robot control software returns a proper error code if there is any trouble with the hardware. Before start, unplug one of the sensors or actuators from the robot control computer. The test must be repeated for all sensors and actuators.

# Step 1
send STRING(CMD, START-UP)
if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point 1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(DNP) within 10s) failure # Check point 1.3

DNP: Device Not Present (code 16)

Test 3: Calibration error test

Updated on 9/10/13 Check if the robot control software returns a proper error code if the calibration matrix is not valid e.g. non-orthogonal matrix.

# Step 1
send STRING(CMD, START_UP)
if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3

# Step 2
send STRING(CMD, PLANNING)
if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure   # Check point 2.2

# Step 3
send STRING(CMD, CALIBRATION)
if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 3.2

send TRANSFORM(CLB, invalid_matrix)
if (not receive TRANSFORM(ACK, invalid_matrix) within 100ms) failure # Check point 3.3
if (not receive STATUS(CALIBRATION, CE) within 10s) failure # Check point 3.4

CE: Configuration error (code 10). Example of non-orthoganl 4x4 matrix is (1.0, 1.0, 1.0, 1.0; 1.0, 1.0, 1.0, 1.0; 1.0, 1.0, 1.0, 1.0; 1.0, 1.0, 1.0, 1.0)

Test 4: Targeting without calibration test

Updated on 9/10 Check if the robot control software returns a proper error code if the user attempts to run targeting before sending calibration matrix

# Step 1
send STRING(CMD, START-UP)
if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point 1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START-UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(OK) within 10s) failure # Check point 1.3
 
# Step 2
send STRING(CMD, PLANNING) 
if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure   # Check point 2.2

# Step 3
send STRING(CMD, CALIBRATION)
if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 3.2

# Step 4
send STRING(CMD, TARGETING)
if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 4.2
if (not receive STATUS(TARGETING, DNR) within 10s) failure # Check point 4.3

DNR: Device not ready (code 13)

Test 5: Out of range test

Updated on 9/10/13 Check if the robot control software returns a proper error code if a target outside of its workspace is given. Assume target described by matrix3 in the image coordinate system is out of the range for the robot registered to the image coordinate system using matrix 1.

# Step 1
send STRING(CMD, START-UP)
if (not receive STRING(ACK, START-UP) within 100ms) failure # Check point #1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START-UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(OK) within 10s) failure  # Check point #1.3

# Step 2
send STRING(CMD, PLANNING)
if (not receive STRING(ACK, PLANNING) within 100ms) failure  # Check point #2.1
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure   # Check point 2.2

# Step 3 
send STRING(CMD, CALIBRATION)
if (not receive STRING(ACK, CALIBRATION) within 100ms) failure  # Check point #3.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 3.2

send TRANSFORM(CLB, matrix1)
if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure  # Check point #3.3
if (matrix1 != matrix2) failure   # Check point #3.4
if (not receive STATUS(CALIBRATION, OK) within 10s) failure   # Check point #3.5

# Step 4
send STRING(CMD, TARGETING)
if (not receive STRING(ACK, TARGETING) within 100ms) failure   # Check point #4.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure   # Check point 4.2
if (not receive STATUS(TARGETING, OK) within 10s) failure   # Check point #4.3

send TRANSFORM(TGT, matrix3)
if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure  # Check point #4.4
if (matrix3 != matrix4) failure   # Check point #4.5
if (not receive STATUS(TARGET, CE) within 10s) failure   # Check point #4.6

CE: Configuration error (code 10)

Test 6: Stop during operation test

Updated on 9/10/13 Check if the robot stops when the STOP command is sent to the robot while the robot is moving.

# Step 1
send STRING(CMD, START_UP)
if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3

# Step 2
send STRING(CMD, PLANNING)
if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure   # Check point 2.2

# Step 3
send STRING(CMD, CALIBRATION)
if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 3.2

send TRANSFORM(CLB, matrix1)
if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
if (matrix1 != matrix2) failure # Check point 3.4
if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5

# Step 4
send STRING(CMD, TARGETING)
if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure   # Check point 4.2
if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3

send TRANSFORM(TGT, matrix3)
if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.4
if (matrix3 != matrix4) failure  # Check point 4.5
if (not receive STATUS(TARGET, OK) within 10s) failure  # Check point 4.6
if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure  # Check point 4.7
if (matrix3 != matrix5) failure  # Check point 4.8

# Step 5
send STRING(CMD, MOVE_TO_TARGET)
if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure   # Check point 5.2

if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.4
if (not receive TRANSFORM(CURRENT_POSITION, matrix 7) within 100ms after the status message is received) failure # Check point 5.5
if (matrix 7 does not match the current position of the robot) failure # Check point 5.6

# Step 6
// While the robot is moving to the target
send STRING(CMD, STOP) before receiving STATUS(MOVE_TO_TARGET, OK) 
if (not receive STRING(ACK, STOP) within 100ms) failure  #Check point #6.1
if (not receive STATUS(CURRENT_STATUS, OK,0,STOP) within 100ms) failure   # Check point 6.2
if (not receive STATUS(STOP, OK) within 200ms) failure  #Check point #6.3

The test fails if the robot does not stop within 200ms after sending STRING(CMD, STOP).

Test 7: Emergency stop during operation test

Updated on 9/10/13 Check if the robot stops when the EMERGENCY command is sent to the robot while the robot is moving.


# Step 1
send STRING(CMD, START_UP)
if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3

# Step 2
send STRING(CMD, PLANNING)
if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure   # Check point 2.2

# Step 3
send STRING(CMD, CALIBRATION)
if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 3.2

send TRANSFORM(CLB, matrix1)
if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
if (matrix1 != matrix2) failure # Check point 3.4
if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5

# Step 4
send STRING(CMD, TARGETING)
if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure   # Check point 4.2
if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3

send TRANSFORM(TGT, matrix3)
if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.4
if (matrix3 != matrix4) failure  # Check point 4.5
if (not receive STATUS(TARGET, OK) within 10s) failure  # Check point 4.6
if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure  # Check point 4.7
if (matrix3 != matrix5) failure  # Check point 4.8

# Step 5
send STRING(CMD, MOVE_TO_TARGET)
if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure   # Check point 5.2

if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.4
if (not receive TRANSFORM(CURRENT_POSITION, matrix 7) within 100ms after the status message is received) failure # Check point 5.5
if (matrix 7 does not match the current position of the robot) failure # Check point 5.6

# Step 6
// While the robot is moving to the target
send STRING(CMD, EMERGENCY) before receiving STATUS(MOVE_TO_TARGET, OK) 
if (not receive STRING(ACK, EMERGENCY) within 100ms) failure   # Check point #6.1
if (not receive STATUS(CURRENT_STATUS, OK,0,EMERGENCY) within 100ms) failure   # Check point 6.2
if (not receive STATUS(STOP, EMERGENCY) within 200ms) failure   # Check point #6.3

The test fails if the robot does not completely shutdown within 200ms after sending STRING(CMD, EMERGENCY).

Test 8: MOVE_TO_TARGET without sending target

Updated on 9/10/13

# Step 1
send STRING(CMD, START_UP)
if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3

# Step 2
send STRING(CMD, PLANNING)
if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure   # Check point 2.2

# Step 3
send STRING(CMD, CALIBRATION)
if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 3.2

send TRANSFORM(CLB, matrix1)
if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
if (matrix1 != matrix2) failure # Check point 3.4
if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5

# Step 4
send STRING(CMD, TARGETING)
if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure   # Check point 4.2
if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3

# Step 5
send STRING(CMD, MOVE_TO_TARGET)
if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure   # Check point 5.2
if (not receive STATUS(MOVE_TO_TARGET, DNR) within 100ms after the robot reaches the target) failure # Check point #5.3

Test 9: Accidental target/move_to command during manual mode

Updated on 9/10/13

# Step 1
send STRING(CMD, START_UP)
if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3

# Step 2
send STRING(CMD, PLANNING)
if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure   # Check point 2.2

# Step 3
send STRING(CMD, CALIBRATION)
if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 3.2

send TRANSFORM(CLB, matrix1)
if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
if (matrix1 != matrix2) failure # Check point 3.4
if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5

# Step 4
send STRING(CMD, TARGETING)
if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure   # Check point 4.2
if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3

send TRANSFORM(TGT, matrix3)
if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.4
if (matrix3 != matrix4) failure  # Check point 4.5
if (not receive STATUS(TARGET, OK) within 10s) failure  # Check point 4.6
if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure  # Check point 4.7
if (matrix3 != matrix5) failure  # Check point 4.8

# Step 5
send STRING(CMD, MOVE_TO_TARGET)
if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure   # Check point 5.2

if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
if (not receive STATUS(MOVE_TO_TARGET, OK) within 100ms after the robot reaches the target) failure # Check point 5.4
if (not receive TRANSFORM(CURRENT_POSITION, matrix 7) within 100ms after the status message is received) failure # Check point 5.5
if (matrix 7 does not match the current position of the robot) failure # Check point 5.6

# Step 6
send STRING(CMD, MANUAL)
if (not receive STRING(ACK, MANUAL) within 100ms) failure # Check point 6.1
if (not receive STATUS(CURRENT_STATUS, OK,0,MANUAL) within 100ms) failure   # Check point 6.2
if (not receive STATUS(MANUAL, OK) within 10s) failure # Check point 6.3

# Step 7
send STRING(CMD, MOVE_TO_TARGET)
if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 7.1
if (not receive STATUS(CURRENT_STATUS, OK,0,MANUAL) within 100ms) failure   # Check point 6.2
if (not receive STATUS(MOVE_TO_TARGET, DNR) within 100ms after the robot reaches the target) failure # Check point 7.2

The test fails if the robot starts moving.

Test 10: Hardware error during operation

Updated on 9/10/13 Unplug one of motors/encoders while the robot is moving to the target.

# Step 1
send STRING(CMD, START_UP)
if (not receive STRING(ACK, START_UP) within 100ms) failure   # Check point 1.1
if (not receive STATUS(CURRENT_STATUS, OK,0,START_UP) within 100ms) failure   # Check point 1.2
if (not receive STATUS(START_UP, OK) within 10s) failure # Check point 1.3

# Step 2
send STRING(CMD, PLANNING)
if (not receive STRING(ACK, PLANNING) within 100ms) failure # Check point 2.1
if (not receive STATUS(CURRENT_STATUS, OK,0,PLANNING) within 100ms) failure   # Check point 2.2

# Step 3
send STRING(CMD, CALIBRATION)
if (not receive STRING(ACK, CALIBRATION) within 100ms) failure # Check point 3.1
if (not receive STATUS(CURRENT_STATUS, OK,0,CALIBRATION) within 100ms) failure   # Check point 3.2

send TRANSFORM(CLB, matrix1)
if (not receive TRANSFORM(ACK, matrix2) within 100ms) failure # Check point 3.3
if (matrix1 != matrix2) failure # Check point 3.4
if (not receive STATUS(CALIBRATION, OK) within 10s) failure #Check point 3.5

# Step 4
send STRING(CMD, TARGETING)
if (not receive STRING(ACK, TARGETING) within 100ms) failure # Check point 4.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGETING) within 100ms) failure   # Check point 4.2
if (not receive STATUS(TARGETING, OK) within 10s) failure # Check point 4.3

send TRANSFORM(TGT, matrix3)
if (not receive TRANSFORM(ACK, matrix4) within 100ms) failure # Check point 4.4
if (matrix3 != matrix4) failure  # Check point 4.5
if (not receive STATUS(TARGET, OK) within 10s) failure  # Check point 4.6
if (not receive TRANSFORM(TARGET, matrix5) within 20s) failure  # Check point 4.7
if (matrix3 != matrix5) failure  # Check point 4.8

# Step 5
send STRING(CMD, MOVE_TO_TARGET)
if (not receive STRING(ACK, MOVE_TO_TARGET) within 100ms) failure # Check point 5.1
if (not receive STATUS(CURRENT_STATUS, OK,0,TARGET) within 100ms) failure   # Check point 5.2

if (not start receiving TRANSFORM(CURRENT_POSITION, matrix 6) in 10s) failure # Check point 5.3
 

While the robot is moving to the target, unplug one of the cables for the actuators or the sensors

# Step 6
if (not receive STATUS(MOVE_TO_TARGET, 19) within 100ms) failure  # Check point #6.1
3D Slicer (operator) Message MRI Radiologist Note
Start-up
The operator presses "Start-up" button
Send command to robot >> STRING(CMD_XXXX, START_UP) >> XXXX is a unique query ID (string of any ASCII letters up to 16 bytes)
<< STRING(ACK_XXXX, START_UP) << Echo back an acknowledgement command was received, but not yet completed XXXX is the same unique query ID as the START_UP message.
<< STATUS(CURRENT_STATUS, Code:0:Phase) << Code=OK: Confirm that the robot is transition to START_UP mode. Phase should be "START_UP". Code=DNR: Fails to transition. Phase should be the name of the current workphase DNR: Device not ready (13)
Start up and initialize the hardware. Run the robot homing procedure if necessary (skip if already successfully completed). Move robot to home (loading) configuration.
<< STATUS(START_UP, Code:??:??) << Code=OK: Confirm when robot is initialized
Code>=2: Error. See error list
Display the result of start up process.