Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polaris Vega - PlusApp Server not working with both Active and Passive markers at the same time #1198

Open
orubioDeneb opened this issue Aug 19, 2024 · 2 comments

Comments

@orubioDeneb
Copy link

Good Afternoon

We are having problems simultaneously loading both passive and active markers with PlusServer.

We have a set of markers that include several Passive and just one Active marker. The ROM files for each marker are validated using NDI toolbox. We are using a XML file like this (reduced for convenience):

<PlusConfiguration version="2.1">
	<DataCollection StartupDelaySec="1.0">
		<DeviceSet Name="Surgery Tracking configuration" />
		<Device Id="Polaris Vega" Type="NDITracker" AcquisitionRate="400" HardwareDataAveragingDepth="4" BaudRate="1228739" NetworkHostname="172.31.2.101" ToolReferenceFrame="Tracker">
			<DataSources>
				<DataSource Type="Tool" Id="MrkStylus" RomFile="NDI_8700340_0.rom" />
				<DataSource Type="Tool" Id="MrkHead" RomFile="Deneb_2004_0.rom" />
			</DataSources>
			<OutputChannels>
				<OutputChannel Id="TrackerStream">
					<DataSource Id="MrkStylus" />
					<DataSource Id="MrkHead" />
				</OutputChannel>
			</OutputChannels>
		</Device>
	</DataCollection>
	<CoordinateDefinitions>
		<Transform From="StylusTip" To="MrkStylus" Matrix="1.000000 0.000000 0.000000 -17.442356 0.000000 1.000000 0.000000 0.012844 0.000000 0.000000 1.000000 157.903931 0.000000 0.000000 0.000000 1.000000" Error="0.0" Date="2024/07/09 13:48:45" />
		<Transform From="MrkHead" To="Tcp" Matrix="0.992962 0.001754 0.118425 55.492161 -0.001609 0.999998 -0.001322 37.873444 -0.118427 0.001123 0.992962 -404.181976 0.000000 0.000000 0.000000 1.000000" Error="0" Date="2024/07/18 14:32:44" />
	</CoordinateDefinitions>
	<PlusOpenIGTLinkServer MaxNumberOfIgtlMessagesToSend="1" MaxTimeSpentWithProcessingMs="50" ListeningPort="18944" SendValidTransformsOnly="true" OutputChannelId="TrackerStream">
		<DefaultClientInfo>
			<MessageTypes>
				<Message Type="TRANSFORM" />
			</MessageTypes>
			<TransformNames>
                                <Transform Name="MrkStylusToTracker" />
 				<Transform Name="MrkHeadToTracker" />
			</TransformNames>
		</DefaultClientInfo>
	</PlusOpenIGTLinkServer>
</PlusConfiguration>

The Behavior we are seeing at this moment is:

  • If we use the Deneb_2004_0.rom file configured as active marker, and the NDI_8700340_0.rom configured as passive, when connecting to the server, we aren't receiving any valid transformation.
  • If we use both Deneb_2004_0.rom file and the NDI_8700340_0.rom configured as passive, maintaining the same geometry for the previously active marker and just modifying the marker type, both tools are correctly reported at client side
  • If we only use the Deneb_2004_0.rom file configured as active marker, removing from the config file the passive ones, we are also able to correctly see tracking information output.

For obtaining more information about the problem, We've activated all traces for the PlusServer App. The traces referring the loading of the tools seemed OK, but we've seen the following lines that could give some insight about the problem:

|DEBUG|2578.453000|SERVER> NDI Command:BX2:--6d=tools --1d=none| in D:\PB-b\PlusLib\src\PlusDataCollection\NDICAPITracking\vtkPlusNDITracker.cxx(257)
|DEBUG|2578.458000|SERVER> Polaris Vega-MrkCalibToTracker: vtkPlusBuffer: Cannot do data interpolation. The closest item to the requested time (time: 2.083229, uid: 172) is invalid.| in D:\PB-b\PlusLib\src\PlusDataCollection\vtkPlusBuffer.cxx(1200)
|DEBUG|2578.459000|SERVER> Polaris Vega-MrkPatientToTracker: vtkPlusBuffer: Cannot do data interpolation. The closest item to the requested time (time: 2.083229, uid: 172) is invalid.| in D:\PB-b\PlusLib\src\PlusDataCollection\vtkPlusBuffer.cxx(1200)
|DEBUG|2578.460000|SERVER> Polaris Vega-MrkStylusToTracker: vtkPlusBuffer: Cannot do data interpolation. The closest item to the requested time (time: 2.083229, uid: 172) is invalid.| in D:\PB-b\PlusLib\src\PlusDataCollection\vtkPlusBuffer.cxx(1200)
|DEBUG|2578.461000|SERVER> Polaris Vega-MrkTokenToTracker: vtkPlusBuffer: Cannot do data interpolation. The closest item to the requested time (time: 2.083229, uid: 172) is invalid.| in D:\PB-b\PlusLib\src\PlusDataCollection\vtkPlusBuffer.cxx(1200)
|DEBUG|2578.461000|SERVER> Polaris Vega-MrkToolToTracker: vtkPlusBuffer: Cannot do data interpolation. The closest item to the requested time (time: 2.083229, uid: 172) is invalid.| in D:\PB-b\PlusLib\src\PlusDataCollection\vtkPlusBuffer.cxx(1200)
|DEBUG|2578.462000|SERVER> Polaris Vega-MrkTrocarToTracker: vtkPlusBuffer: Cannot do data interpolation. The closest item to the requested time (time: 2.083229, uid: 172) is invalid.| in D:\PB-b\PlusLib\src\PlusDataCollection\vtkPlusBuffer.cxx(1200)
|DEBUG|2578.465000| NDI Reply: c4a54000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|DEBUG|2578.466000|SERVER> NDI Command:BX2:--6d=tools --1d=none| in D:\PB-b\PlusLib\src\PlusDataCollection\NDICAPITracking\vtkPlusNDITracker.cxx(257)
|DEBUG|2578.469000|SERVER> Polaris Vega-MrkHeadToTracker: vtkPlusBuffer: Cannot do data interpolation. The closest item to the requested time (time: 2.093971, uid: 173) is invalid.| in D:\PB-b\PlusLib\src\PlusDataCollection\vtkPlusBuffer.cxx(1200)
|DEBUG|2578.470000| NDI Reply: c4a554000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

What we are seeing here is that each BX2 command seems to just report 1 type of marker at a time (The upper block of markers are the passive ones for our application and the lower MrkHead is the active one).

We are aware that using different types of markers simultaneously reduces the effective frame rate of the tracker, but we were expecting that the BX2 command would return just the combination of both marker types each time, which seems to not be the case. Some test we performed with a custom application that used the Stream version of the NDI API responses seemed to correctly gather all makers into a single response, so maybe this is an intended behavior by NDI API for giving more flexibility to users.

We've seen this behavior with both PlusServer 2.9.0 snapshot and with commit related with #1126 issue

Kind regards

@adamrankin
Copy link
Member

Does the BX2 command support both responses in a single query? If so, please submit a ticket to NDICAPI to extend the functionality of the BX2 support

@orubioDeneb
Copy link
Author

As we understand from documentation, it should be able to receive different frames in just one response:

...The reply can contain a single frame or multiple frames...

Upon Success:
<Start Sequence><2 byte Reply Length><Header CRC><GBF Version>
<Component Count><Frame Component 1>...<Frame Component N><Data CRC>

Even so, we contacted NDI Support for better understanding of the BX2 command, as we've observed some similar (incorrect) behavior using one of their utilities with this use case, so we can better direct the request in NDCAPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants