Difference between revisions of "2013 Summer Project Week:ProstateBRP"
From NAMIC Wiki
Line 27: | Line 27: | ||
</div> | </div> | ||
</div> | </div> | ||
+ | |||
+ | ==Protocol Definition= | ||
+ | (This is not a master copy) | ||
+ | |||
+ | |||
+ | {| 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;" | ''Robot Controller'' | ||
+ | | align="left style="background:#e0e0e0;" | ''Radiologist'' | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | Start-up | ||
+ | |- | ||
+ | | align="left" | The operator presses "Start-up" button | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | Send command to robot | ||
+ | | align="left" | >> STRING(COMMAND, START_UP) >> <br> ''DEVICE_NAME=COMMAND, STRING=START_UP'' | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STRING(ACK, START_UP) << <br> ''DEVICE_NAME=ACK, STRING=START_UP'' | ||
+ | | align="left" | Echo back an acknowledgement command was received, but not yet completed | ||
+ | | 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" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(START_UP, OK:??:??) << <br> DEVICE_NAME=START_UP <br>''C=1(OK), SubCode=??, ErrorName=??'' | ||
+ | | align="left" | Confirm when robot is initialized <br> TODO: Refine error/status codes | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | Display the result of start up process. | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | Planning | ||
+ | |- | ||
+ | | align="left" | The operator opens the planning panel | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> STRING(COMMAND, PLANNING) >> | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STRING(ACK, PLANNING) << | ||
+ | | align="left" | Echo back an acknowledgement command was received | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | Do nothing except keep track of current state, robot is awaiting next workphase. | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | Show that the robot is in PLANNING phase. | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | Calibration | ||
+ | |- | ||
+ | | align="left" | The operator opens the calibration panel | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> STRING(COMMAND, CALIBRATION) >> | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STRING(ACK, CALIBRATION) << | ||
+ | | align="left" | Echo back an acknowledgement command was received | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | Do nothing except keep track of current state, robot is awaiting calibration transform | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | Show that the robot is in CALIBRATION phase. | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | Nav Software (3D Slicer or RadVision) calculates calibration matrix | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> TRANSFORM(CALIBRATION, 4x4 calibration matrix in RAS coordinates) >> | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << TRANSFORM(ACK, 4x4 calibration matrix in RAS coordinates) << | ||
+ | | align="left" | Echo back an acknowledgement transform was received | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | Update calibration transform, set flag that registration has been set externally, reply with confirmation | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(CALIBRATION, OK:??:??) << <br> DEVICE_NAME=CALIBRATION <br>''C=1(OK), SubCode=??, ErrorName=??'' | ||
+ | | align="left" | Confirm that calibration was received and robot is ready for next workphase (targeting) | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | Show that calibration successfully sent to robot. | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | Targeting | ||
+ | |- | ||
+ | | align="left" | The operator enters "Targeting" mode | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> STRING(COMMAND, TARGETING) >> | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STRING(ACK, TARGETING) << | ||
+ | | align="left" | Acknowledge receiving targeting command | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | Confirm if robot is ready for targeting, check if calibration was received | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(TARGETING, OK:??:??) << <br> DEVICE_NAME=TARGETING <br>''C=1(OK), SubCode=??, ErrorName=??'' | ||
+ | | align="left" | Confirm robot has entered targeting mode | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(TARGET, DNR:??:??) << <br> DEVICE_NAME=TARGETING <br>''C=13(DeviceNotReady), SubCode=??, ErrorName=??'' | ||
+ | | align="left" | '''ERROR CASE:''' If not able to enter targeting mode (i.e. calibration not received, reply with Code:13 (Device Not Ready) | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | 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" | >> TRANSFORM(TARGET, 4x4 target matrix in RAS coordinates) >> | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << TRANSFORM(ACK, 4x4 target matrix) << | ||
+ | | align="left" | Acknowledge receipt of target transformation by echoing back | ||
+ | | 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" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(TARGET, OK:??:??) << <br> DEVICE_NAME=TARGETING <br>''C=1(OK), SubCode=??, ErrorName=??'' | ||
+ | | align="left" | Reply with OK if target was accepted | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << TRANSFORM(TARGET_POSITION, 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" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(TARGET, DNR:??:??) << <br> DEVICE_NAME=TARGET <br>''C=13(DeviceNotReady), SubCode=??, ErrorName=??'' | ||
+ | | align="left" | '''ERROR CASE:''' If not in targeting mode, reply with Code:13 (Device Not Ready) | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(TARGET, CE:??:??) << <br> DEVICE_NAME=TARGET <br>''C=10(ConfigurationError), SubCode=??, ErrorName=??'' | ||
+ | | align="left" | '''ERROR CASE:''' If not a valid target (i.e. out of workspace), reply with Code:10 (ConfigurationError) | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | Display the reachable target position set in robot controller. | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | 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" | >> STRING(COMMAND, MOVE_TO_TARGET) >> | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STRING(ACK, MOVE_TO_TARGET) << | ||
+ | | align="left" | Echo back an acknowledgement command was received (not yet completed) | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | Alert the clinician to hold footpedal to align the robot | ||
+ | | 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" | | ||
+ | | align="left" | | ||
+ | | align="left" | The robot moves to the target and streams its pose during motion | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << TRANSFORM(CURRENT_POSITION, 4x4 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" | | ||
+ | |- | ||
+ | | 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" | Display that the robot is at the target. Send confirmation. | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(DONE_MOVING, OK:??:??) << <br> DEVICE_NAME=DONE_MOVING <br>''C=1(OK), SubCode=??, ErrorName=??'' | ||
+ | | align="left" | Reply with OK when robot reaches target | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << TRANSFORM(CURRENT_POSITION, 4x4 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" | | ||
+ | |- | ||
+ | | align="left" | Display the current final robot position at the target. | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | Needle Insertion (Manual) | ||
+ | |- | ||
+ | | align="left" | Ask to lock the robot | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | The operator presses "Lock" button | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> STRING (COMMAND, MANUAL) >> | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STRING(ACK, MANUAL) << | ||
+ | | align="left" | Echo back an acknowledgement command was received (not yet completed) | ||
+ | | 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" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(MANUAL, OK:??:??) << <br> DEVICE_NAME=MANUAL <br>''C=1(OK), SubCode=??, ErrorName=??'' | ||
+ | | align="left" | Reply with OK when robot is in a safe, locked state | ||
+ | | 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" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | Retract the needle | ||
+ | |- | ||
+ | | 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" | The operator presses "Unlock" | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> STRING(COMMAND, TARGETING) >> | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STRING(ACK, TARGETING) << | ||
+ | | align="left" | Acknowledge receiving targeting command | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | Return robot to home (loading) position. ?? THIS MAKE SENSE HERE, SHOULD IT BE A SEPARATE 'HOME' COMMAND | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | Return to targeting mode, check if ready for targeting. | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | Additional Commands | ||
+ | |- | ||
+ | | align="left" | The operator presses "Stop" button | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> STRING(COMMAND, STOP) >> | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | The robot stops all motion. Stays in current state/workphase. | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(COMMAND, STOP) << | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | | ||
+ | |- | ||
+ | | align="left" | The operator presses "Emergency" button | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> STRING(COMMAND, EMERGENCY) >> | ||
+ | | 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" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(COMMAND, EMERGENCY) << | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | | ||
+ | |- | ||
+ | | align="left" | Request current robot pose (or target or calibration transforms) | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> GET_TRANSFORM(CURRENT_POSITION) >> | ||
+ | | 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" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << TRANSFORM(CURRENT_POSITION, 4x4 current robot pose matrix in RAS coordinates) << | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | | ||
+ | |- | ||
+ | | align="left" | Request the robot status/workphase | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | >> STRING(COMMAND, GET_STATUS) >> ?? CONFIRM COMMAND STRUCTURE FOR STATUS REQUEST | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | | align="left" | Sends current state/workphase. ?? SHOULD IT SEND OTHER INFO TOO | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(COMMAND, Current Status) << | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |- | ||
+ | | colspan=4 align="center" style="background:#f0f0f0;" | | ||
+ | |- | ||
+ | | 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" | | ||
+ | |- | ||
+ | | align="left" | | ||
+ | | align="left" | << STATUS(ERROR, Error Text) << | ||
+ | | align="left" | | ||
+ | | align="left" | | ||
+ | |||
+ | |} | ||
+ | |||
==Delivery Mechanism== | ==Delivery Mechanism== |
Revision as of 17:13, 17 June 2013
Home < 2013 Summer Project Week:ProstateBRPKey Investigators
- WPI: Gregory Fischer
- BWH: Junichi Tokuda, Nobuhiko Hata, Clare Tempany
Objective
- Define and review the clinical workflow
- Test a new OpenIGTLink-based communication protocol for Slicer-Robot integration.
Approach, Plan
Progress
=Protocol Definition
(This is not a master copy)
3D Slicer (operator) | Message | Robot Controller | Radiologist |
Start-up | |||
The operator presses "Start-up" button | |||
Send command to robot | >> STRING(COMMAND, START_UP) >> DEVICE_NAME=COMMAND, STRING=START_UP |
||
<< STRING(ACK, START_UP) << DEVICE_NAME=ACK, STRING=START_UP |
Echo back an acknowledgement command was received, but not yet completed | ||
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, OK:??:??) << DEVICE_NAME=START_UP C=1(OK), SubCode=??, ErrorName=?? |
Confirm when robot is initialized TODO: Refine error/status codes |
||
Display the result of start up process. | |||
Planning | |||
The operator opens the planning panel | |||
>> STRING(COMMAND, PLANNING) >> | |||
<< STRING(ACK, PLANNING) << | Echo back an acknowledgement command was received | ||
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(COMMAND, CALIBRATION) >> | |||
<< STRING(ACK, CALIBRATION) << | Echo back an acknowledgement command was received | ||
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(CALIBRATION, 4x4 calibration matrix in RAS coordinates) >> | |||
<< TRANSFORM(ACK, 4x4 calibration matrix in RAS coordinates) << | Echo back an acknowledgement transform was received | ||
Update calibration transform, set flag that registration has been set externally, reply with confirmation | |||
<< STATUS(CALIBRATION, OK:??:??) << DEVICE_NAME=CALIBRATION C=1(OK), SubCode=??, ErrorName=?? |
Confirm that calibration was received and robot is ready for next workphase (targeting) | ||
Show that calibration successfully sent to robot. | |||
Targeting | |||
The operator enters "Targeting" mode | |||
>> STRING(COMMAND, TARGETING) >> | |||
<< STRING(ACK, TARGETING) << | Acknowledge receiving targeting command | ||
Confirm if robot is ready for targeting, check if calibration was received | |||
<< STATUS(TARGETING, OK:??:??) << DEVICE_NAME=TARGETING C=1(OK), SubCode=??, ErrorName=?? |
Confirm robot has entered targeting mode | ||
<< STATUS(TARGET, DNR:??:??) << DEVICE_NAME=TARGETING C=13(DeviceNotReady), SubCode=??, ErrorName=?? |
ERROR CASE: If not able to enter targeting mode (i.e. calibration not received, reply with Code:13 (Device Not Ready) | ||
The operator select a target, Nav software creates a 4x4 matrix for desired 6-DOF robot pose to reach the target | |||
>> TRANSFORM(TARGET, 4x4 target matrix in RAS coordinates) >> | |||
<< TRANSFORM(ACK, 4x4 target matrix) << | Acknowledge receipt of target transformation by echoing back | ||
Calculate if target pose is reachable based on the kinematics, reply with status and set target | |||
<< STATUS(TARGET, OK:??:??) << DEVICE_NAME=TARGETING C=1(OK), SubCode=??, ErrorName=?? |
Reply with OK if target was accepted | ||
<< TRANSFORM(TARGET_POSITION, 4x4 target matrix) << | Send actual target pose in robot controller if one was set (corresponds to when status comes back OK) | ||
<< STATUS(TARGET, DNR:??:??) << DEVICE_NAME=TARGET C=13(DeviceNotReady), SubCode=??, ErrorName=?? |
ERROR CASE: If not in targeting mode, reply with Code:13 (Device Not Ready) | ||
<< STATUS(TARGET, CE:??:??) << DEVICE_NAME=TARGET C=10(ConfigurationError), SubCode=??, ErrorName=?? |
ERROR CASE: If not a valid target (i.e. out of workspace), reply with Code:10 (ConfigurationError) | ||
Display the reachable target position set in robot controller. | |||
The operator confirms the target position set in the controller, and press "MOVE" | |||
>> STRING(COMMAND, MOVE_TO_TARGET) >> | |||
<< STRING(ACK, MOVE_TO_TARGET) << | Echo back an acknowledgement command was received (not yet completed) | ||
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, 4x4 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(DONE_MOVING, OK:??:??) << DEVICE_NAME=DONE_MOVING C=1(OK), SubCode=??, ErrorName=?? |
Reply with OK when robot reaches target | ||
<< TRANSFORM(CURRENT_POSITION, 4x4 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 (COMMAND, MANUAL) >> | |||
<< STRING(ACK, MANUAL) << | Echo back an acknowledgement command was received (not yet completed) | ||
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:??:??) << DEVICE_NAME=MANUAL C=1(OK), SubCode=??, ErrorName=?? |
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" | |||
>> STRING(COMMAND, TARGETING) >> | |||
<< STRING(ACK, TARGETING) << | Acknowledge receiving targeting command | ||
Return robot to home (loading) position. ?? THIS MAKE SENSE HERE, SHOULD IT BE A SEPARATE 'HOME' COMMAND | |||
Return to targeting mode, check if ready for targeting. | |||
Additional Commands | |||
The operator presses "Stop" button | |||
>> STRING(COMMAND, STOP) >> | |||
The robot stops all motion. Stays in current state/workphase. | |||
<< STATUS(COMMAND, STOP) << | |||
The operator presses "Emergency" button | |||
>> STRING(COMMAND, EMERGENCY) >> | |||
The robot stops all motion and disables/locks motors. Switches to Emergency state/workphase. ?? IS THIS THE DESIRED ACTION | |||
<< STATUS(COMMAND, EMERGENCY) << | |||
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, 4x4 current robot pose matrix in RAS coordinates) << | |||
Request the robot status/workphase | |||
>> STRING(COMMAND, GET_STATUS) >> ?? CONFIRM COMMAND STRUCTURE FOR STATUS REQUEST | |||
Sends current state/workphase. ?? SHOULD IT SEND OTHER INFO TOO | |||
<< STATUS(COMMAND, Current Status) << | |||
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, Error Text) << |
Delivery Mechanism
The work will be delivered as a 3D Slicer extension. The code is hosted at https://github.com/ProstateBRP/BRPProstateNav