-
Notifications
You must be signed in to change notification settings - Fork 32
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
additional details in python example #20
Comments
The python API isn't officially supported, but has been worked on by a couple of users. I would recommend reaching out to them to see if they might be willing to implement this. |
Basically,
Basically the result that I get from |
There is a quite complicated protocol to start tracking, for example, you need to explicitly enable each tool you want to use. See implementation in the Plus toolkit (that uses the same ndicapi library but from C++) here: https://github.com/PlusToolkit/PlusLib/blob/master/src/PlusDataCollection/NDICAPITracking/vtkPlusNDITracker.cxx If you don't want to go into such low-level details then you can download and use PlusToolkit's PlusServer application, which connects to the tracker and broadcasts tracking data via OpenIGTLink. You can receive data in Python using https://github.com/SlicerIGT/pyIGTLink. |
Thanks for the suggestions! Unfortunately, I was never able to get ndicapi to work with my camera so I ended up writing my own python script which seems to work well. This may be due to the fact that my polaris camera is over 10 years old (serial port only) and ndicapi may be compatible only with newer cameras...? Another question to the experts. My python code currently works well with the BX 0001 command in that it reports the quaternion of the tool. However, I would like to get the 3D positions of the individual IR markers on the tool. I tried the BX 0008 command and it seems to work in the sense it accepts the command and sends back a properly formatted reply, but the first component is "Number of Markers" which is always 0. I believe that is not an interpretation mistake on my end because the reply block length is short, consistent with no actual marker information. Does anyone have an idea of what I am doing wrong? Looking at the NDI API documentation it seems BX 0008 is the correct command.
|
@spitzbubchen hey there, i am facing the same issue like you where i encounter DISABLED with ndiGetBXTransform. How do you fix this issue? Do u you mind sharing your python script ? |
Hi @spitzbubchen, Sorry I'm not well versed enough in the NDI API protocol to answer about the BX0008 command. You could reach out to NDI support to see if they have any resources you might draw on. |
Sorry, is there a reference doc listing the ndicapi commands for a Polaris camera? Otherwise, would it be possible to add more NDI camera commands in the
ndiBasicExample.py
example file? Maybe some basic commands as:I think these two basic commands would meet the requirements for most users.
The text was updated successfully, but these errors were encountered: