PlusToolkit / PlusLib

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

Difference between unfiltered timestamp is larger than the threshold #803

Open szililaci opened 3 years ago

szililaci commented 3 years ago

Hi,

We are trying to use plus server 2.9 with an atracsys spryTrack 180 device. Once we put a passive marker in front of the camera, we are getting only these lines in debug:

|DEBUG|043.609000| Difference between unfiltered timestamp is larger than the threshold. The unfiltered timestamp may be incorrect. Unfiltered timestamp: 43.609, filtered timestamp: 48.1798, difference: 4.57081, threshold: 0.5. timestamps = [2.604000 3.604000 4.604000 5.604000 6.604000 7.603000 12.604000 13.604000 18.605000 27.605000 28.606000 29.606000 32.606000 37.607000 38.607000 39.607000 40.607000 41.608000 42.609000 43.609000]; frameindexes = [0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 6.000000 7.000000 8.000000 9.000000 10.000000 11.000000 12.000000 13.000000 14.000000 15.000000 16.000000 17.000000 18.000000 19.000000];| in E:\D\PTNPSTb\PlusLib\src\PlusDataCollection\vtkPlusTimestampedCircularBuffer.cxx(624) |INFO|043.674000| Filtered timestamp is probably invalid for tracker buffer item with item index=19, time=43.609. The item may have been tagged with an inaccurate timestamp, therefore it will not be recorded.| in E:\D\PTNPSTb\PlusLib\src\PlusDataCollection\vtkPlusBuffer.cxx(650)

The geometry file we are using should be valid.

Could you please help us what we are missing, or how could we put together a proper configuration file for the device ?

Sunderlandkyl commented 3 years ago

Can you attach your config file?

szililaci commented 3 years ago

config.txt Attached the config file. It is mainly identical with the basic atrycsys config. We tried some tips from: https://github.com/SlicerIGT/SlicerIGT/issues/186 But none of them worked.

When we set SendValidTransformsOnly="FALSE", we do see the MarkerToTracker transform popping up in Slicer, but it is not moving, since the invalid transforms.

Sunderlandkyl commented 3 years ago

The config file looks ok to me.

@markasselin do you have any suggestions?

markasselin commented 3 years ago

What method did you you to create your geometry file?

szililaci commented 3 years ago

We have not create our own. We are using a geometry file what we recived with the device.

markasselin commented 3 years ago

The Atracsys systems come with a bundled tracking viewer, have you tried recognizing the marker using it to verify the geometry file?

szililaci commented 3 years ago

Yes we tried, and the Atracsys software recognized the marker based on the ini file, and was be able to track it.

markasselin commented 3 years ago

Which version of the Atracsys firmware do you have installed for your spryTrack?

szililaci commented 3 years ago

I dont know curretly (probably RC10), I will confirm it once we reach the device again. A potential issue might be that we are using different versions from sdk and from firmware. Plus 2.9 has been built against sdk version RC7 is that right ? ( I only guess it from here: http://perk-software.cs.queensu.ca/plus/doc/nightly/user/DeviceAtracsys.html )

markasselin commented 3 years ago

Yes, this is correct, there is also a newer RC11 as well. PLUS could be updated to support the newer versions, but unfortunately I won't be able to test it since I don't have access to Atracsys hardware at the moment.

@Sunderlandkyl if I made PRs to upgrade the spryTrack version the Atracsys device supports would you be able to test them?

Sunderlandkyl commented 3 years ago

No, I don't have access to the lab right now.

2picoder commented 3 years ago

On a similar note, I am trying to run NDI Polaris Vicra camera and I am getting the same error. On the documentation page:

http://perk-software.cs.queensu.ca/plus/doc/nightly/user/DeviceNDI.html

It does not state say which version of firmware I need on the camera. Where can I find that information?

markasselin commented 3 years ago

@2picoder thanks for the error report. To help us debug, could you please include the config file & PLUS version you're trying to use?

On a similar note, I am trying to run NDI Polaris Vicra camera and I am getting the same error. On the documentation page:

http://perk-software.cs.queensu.ca/plus/doc/nightly/user/DeviceNDI.html

It does not state say which version of firmware I need on the camera. Where can I find that information?

@Sunderlandkyl do you think that this points to an issue outside the devices since this now impacts both NDI and Atracsys trackers?

2picoder commented 3 years ago

@markasselin I am using PLUS version: PlusApp-2.9.0.20210412-spryTrack-Telemed-Win32 and my config file is as below:

PlusDeviceSet_Server_NDIPolaris.txt

szililaci commented 3 years ago

In the meantime I can confirm we have firmware version RC11 on the device. Unfortunately atracsys recommends do not downgrade firmware on devices. So I belive the only way we can proceed further is to build Plus server against atracsys sdk version RC11 by ourselves. @markasselin could you please help us out how can we do this ?

markasselin commented 3 years ago

@szililaci I sent a PR which should make PLUS buildable against RC11 of the Atracsys spryTrack library. Please refer to the build instructions for more information on compiling PLUS.

markasselin commented 3 years ago

@markasselin I am using PLUS version: PlusApp-2.9.0.20210412-spryTrack-Telemed-Win32 and my config file is as below:

PlusDeviceSet_Server_NDIPolaris.txt

@Sunderlandkyl have there been any reports like this using an NDI tracker with a different version of PLUS (i.e. the non Atracsys ones)?

Sunderlandkyl commented 3 years ago

I haven't seen any other reports regarding this issue, except the ones in this thread.

@lassoan Do you have an idea of what might be causing this?

lassoan commented 3 years ago

This happens when there is a sudden jump between unfiltered timestamps. The filtering uses moving average, so after a sudden jump the filter stabilizes and the difference between filtered and unfiltered timestamps will diminish. If this error comes up too often for too long then probably the timestamps are not acquired at regular intervals (which may indicate an error).

szililaci commented 3 years ago

@lassoan We are seeing this error all the time. The difference does get smaller after a certain time as you mentioned, but still stays above the threshold. As I currently found MaxAllowedFilteringTimeDifference cannot be adjusted from config, but please correct me if I missed something. If you have any suggestion how could we try to fix this, or we missed some config parameter what could be usefull, any idea is more than welcomed! :)

@markasselin Thank you very much for the PR! :) I am trying to build Plus, but had no luck yet. Currently I get the same error as here: https://github.com/PlusToolkit/PlusLib/issues/561, but I could not figure out what could be the rootcause in my case.

In the meantime I have a question after I run into a these lines in the build instruction among advanced parameters: "If you want to build a Slicer loadable module using Plus then turn on PLUSBUILD_USE_3DSlicer option and set the PLUSBUILD_SLICER_BIN_DIRECTORY to your 3D Slicer binary folder."

When I first read it, I thought it would generate a slicer module which would combine the advantages of OpenIGTLinkIf and Plus server, resulting a module which could connect to a device and get the transforms into slicer directly. But from the comment I found in the code:

OPTION(PLUSBUILD_USE_3DSlicer "Instead of building ITK, VTK, OpenIGTLink, etc., get them from a 3D Slicer build tree." OFF)

it only suggest me that if I set these, my build time would be shorter, since I could use the prebuild parts from slicer (if I built slicer already). Could you please help me how these parameters relates to a slicer module?