PlusToolkit / PlusLib

Software library for data acquisition, pre-processing, and calibration for navigated image-guided interventions.
http://www.plustoolkit.org
Other
130 stars 102 forks source link

Error Configuring Multi-Channel Aurora NDI Tools #1159

Open colinday99 opened 4 months ago

colinday99 commented 4 months ago

We've been using the NDI Aurora with Plus successfully for 6DOF (single channel) tools. I have been following the documentation here in an attempt to wire up multi-channel tools. Specifically, I have been specifying two DataSources, one with PortName=0 and one with PortName=100.

I have a two channel 5DOF sensor plugged into port 0, and a 6DOF single channel tool plugged into ports 1 and 2.

The PortName=100 seems to consistently throw the error "Active NDI tool not found in port 100. Make sure the tool is plugged in.| in :\D\PSNP64b\PlusLib\src\PlusDataCollection\NDICAPITracking\vtkPlusNDITracker.cxx(953)"

I have tried this with both possible ROM files for these sensors, the 2x5DOF and 1x5DOF for each. It doesn't make a difference to the port error.

I am able to track these sensors in NDI's provided software.

Please let me know if there is a known fix for this error or if I have missed something.

Log file

Config file:

<PlusConfiguration version="2.1">
    <DataCollection StartupDelaySec="1.0">
        <DeviceSet 
      Name="PlusServer: NDI Aurora C3"
      Description="Broadcasting tool tracking data through OpenIGTLink
      Tracking a single EM pointer and an optical pointer and reference." />
        <Device
      Id="EmTracker" 
      Type="AuroraTracker"
      SerialPort="3"
      BaudRate="115200"
      AcquisitionRate="20"
      LocalTimeOffsetSec="0.0"
      ToolReferenceFrame="EmTracker" >
            <DataSources>
                <DataSource Type="Tool" Id="Ref1" PortName="1" />
                <DataSource Type="Tool" Id="Ref2" PortName="2" />
                <DataSource Type="Tool" Id="Distal" PortName="0" RomFile="NdiToolDefinitions/DDRO-1000-2368-01_GENERIC_2x5D.rom"/>
                <DataSource Type="Tool" Id="Proximal" PortName="100" RomFile="NdiToolDefinitions/DDRO-1000-2368-01_GENERIC_2x5D.rom"/>
            </DataSources>
            <OutputChannels>
                <OutputChannel Id="EmTrackerStream">
                    <DataSource Id="Ref1" />
                    <DataSource Id="Ref2" />
                    <DataSource Id="Distal" />
                    <DataSource Id="Proximal" />
                </OutputChannel>
            </OutputChannels>
        </Device>
    </DataCollection>
    <PlusOpenIGTLinkServer 
    MaxNumberOfIgtlMessagesToSend="1" 
    MaxTimeSpentWithProcessingMs="50" 
    ListeningPort="18944" 
    SendValidTransformsOnly="TRUE" 
    OutputChannelId="EmTrackerStream" >
        <DefaultClientInfo>
            <MessageTypes>
                <Message Type="TRANSFORM" />
            </MessageTypes>
            <TransformNames>
                <Transform Name="Ref1ToEmTracker" />
                <Transform Name="Ref2ToEmTracker" />
                <Transform Name="DistalToEmTracker" />
                <Transform Name="ProximalToEmTracker" />
            </TransformNames>
        </DefaultClientInfo>
    </PlusOpenIGTLinkServer>
</PlusConfiguration>
Sunderlandkyl commented 4 months ago

NDI PortName and RomFile are both specified for tool DistalToEmTracker. Assuming broken wired rom, using virtual rom instead

You shouldn't specify RomFile for wired tools. Does removing RomFile for the Distal and Proximal tools fix the issue?

colinday99 commented 4 months ago

This is a custom tool assembly wherein NDI's sensors are soldered by us to their tool cable assembly. I believe it will necessary to define the ROM somewhere.

Removing it causes a different error: "Unable to initialize Tool-in-Port. errnum: 19| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\NDICAPITracking\vtkPlusNDITracker.cxx(684)"

Here's the logfile.

Only changes to the config are the removal of the the RomFile parameter from the "Distal" and "Proximal" DataSources.

colinday99 commented 3 months ago

For the sake of anyone with the same issue in future: I was unable to configure this as described in the docs. The only thing that worked was wiring up two fully separate ports, ie one port for each sensor. Multi-channeled user-wired tools, such as NDI's smallest magnetic sensor, (0.3mm x 25mm 5DOF) do not seem to be supported.

adamrankin commented 3 months ago

If you can record the COM port trace from NDI Track and send us the log, we can look at it to see what commands it sends and then compare that to what PLUS sends.