2014 Summer Project Week:Robot Control With OpenIGTLink

From NAMIC Wiki
Revision as of 01:54, 27 June 2014 by Nirav (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < 2014 Summer Project Week:Robot Control With OpenIGTLink

Key Investigators

Project Description

  • This Project is to further develop a workflow and communication protocol for interfacing robots with image-guided therapy systems using OpenIGTLink.
  • Also, we would like to enhance JAVA implementation of IGTLink and support more message types.


  • Some of the supported standard messages in OpenIGTLink for JAVA are Position, Status, String and Transform. During this week we would like to add support for other message types like NDArray, Sensor and any other useful messages for controlling the robot using IGTLink.
  • Also, would like to collaborate with team working on MATLAB interface for IGTLink and test it with JAVA implementation.

Approach, Plan

  • Taking BRP Robot Application as base and extending it for any other robot applications.
  • Testing it for MATLAB and standard C++ implementation.


  • We have tested IGTLink communication with the clinical workflow described at http://www.na-mic.org/Wiki/index.php/ProstateBRP_OpenIGTLink_Communication_June_2013 which was implemented during 2013 Summer Project Week.
  • String, NDArray and Transform messages tested between JAVA OpenIGTLink Server and MATLAB client.
  • MATLAB OpenIGTLink code by Andras Lasso is made more modular and easy to use. Supports STRING, TRANSFORM and 1D Float arrays fromm MATLAB to other clients and MATLAB client can receive STRING and TRANSFORM messages.
  • XML Based string messages may be used for getting and setting parameter values. Tested it with MATLAB sending a STRING message to JAVA application to set value of a parameter using STRING command like <Command Name='SetVar' theta='23.5'/>. Similarly we can define such commands with more arguments.
  • Still working on other message types, especially IMAGE message might be of interest to many.

OpenIGTLink XML command specification

  • Command message:
    • Type: STRING
    • Device name: CMD_uid
      • The _uid part is optional, it's for matching requests and responses. The uid is a unique string to identify the request, such as a counter or timestamp.)
    • Content: Command XML element
      • Name attribute contains the command name
      • Any number of additional attributes and/or child elements to specify further parameters for the command can be added.
  • Command response message:
    • Type: STRING
    • Device name: ACK_uid
      • uid matches the uid in the command message's device name
    • Content: CommandReply XML element
      • Status attribute containing the status of the command; allowed values: SUCCESS or FAIL
      • Message attribute containing a human-readable status of the command completion
      • Any number of additional attributes and/or child elements to specify further return values can be added.
    • Example command and response content:
      • Command: <Command Name="SomeCommandName" SomeAttribute1="attribute value 1" SomeAttribute2="123" />
        • Should we specify type of the attribute??OR if its got any alphabet then its should be string otherwise numeric value
        • Should we specify that this is a read/write request, may be should we specify some standard commands??
      • Response: <CommandReply Status="SUCCESS" SomeReturnValue1="123" SomeReturnValue1="abc" />

String message send/receive in Matlab: https://subversion.assembla.com/svn/slicerrt/trunk/MatlabBridge/src/MatlabCommander/commandserver/cli_commandserver.m