Page 1 of 1

OptiTrack Peripheral API

Posted: Mon Mar 06, 2017 2:43 am
by kaz
I 'm trying to synchronize the force plate (not AMTI and Bertec) with Motive using the Peripheral API example. However, the following error is displayed.

"The selected device xxx has no enabled channels.
Please enable at least one channel first. "

How can I add a force plate channel with "DeviceType = 2" ?

Re: OptiTrack Peripheral API

Posted: Tue Mar 07, 2017 2:41 pm
by morgan
To register the peripheral device as a force plate:

In your DeviceFactory::Create() routine

1. Register your device as a force plate:

Code: Select all

    pDevice->SetProperty(DeviceProp_DeviceType, (long) DeviceType_ForcePlate);
2. Add a channel for each value your device reports:

Code: Select all

    channelIndex = pDevice->AddChannelDescriptor("Fx", ChannelType_Float);
3. Enable the channel by default

Code: Select all

    pDevice->ChannelDescriptor(i)->SetProperty(ChannelProp_Enabled, true);
In order for the plate to represent geometrically in Motive 3D view with force vectors, you will also need to add and set the values of the following properties to your device:

Code: Select all

    static const char* ForcePlateProp_Length    = "Length (in)";
    static const char* ForcePlateProp_Width     = "Width (in)";
    static const char* ForcePlateProp_XOffset   = "XOffset (in)";
    static const char* ForcePlateProp_YOffset   = "YOffset (in)";
    static const char* ForcePlateProp_ZOffset   = "ZOffset (in)";
Hope this helps,


Re: OptiTrack Peripheral API

Posted: Thu Mar 09, 2017 12:55 am
by kaz
Hi Morgan,

Thank you very much for your rapid response.

I was able to register the force plate as a device and added the property of the force plate.

However, when "Set Position" is done, the display of the force plate disappears. (The XY axis of the force plate is displayed small)

Do you need any additional steps?

Thanks again for your help.
Best regards,

before Set Position
Before_SetPosition.png (197.93 KiB) Viewed 3325 times
after Set Position
After_SetPosition.png (140.13 KiB) Viewed 3325 times

Re: OptiTrack Peripheral API

Posted: Tue Mar 14, 2017 1:06 pm
by morgan
Attached is a position from a standard AMTI plate. The values compare to your values, with the exception of the electrical offsets, which should not matter for positioning.
fpcal.png (97.69 KiB) Viewed 3316 times
In your volume I notice there are only 2 cameras. Is this a Duo/Trio setup? It's possible the 2 camera count is causing the issue. Is it possible for you to add more cameras?

Re: OptiTrack Peripheral API

Posted: Tue Mar 14, 2017 1:13 pm
by morgan
One more thing to test, Record a TAK file. On playback, you should be able to select the force plate in the asset list. In the Properties Pane for the Force Plate, it should show the "Corners" properties, which are the values for the corners. These are also likely incorrect, however if they are correct, then it's possible the plate is flipped upside down. Just to confirm, are you using one of our newer CS-400 Calibration Squares?

Re: OptiTrack Peripheral API

Posted: Wed Mar 15, 2017 4:04 am
by kaz
The problem is now solved.
I made a basic error.
I registered length and width properties as strings.
In this case, the set value is displayed in the Devices Pane, but it becomes 0 in the asset of the Project Pane.

Thank you for your help.

Re: OptiTrack Peripheral API

Posted: Tue Mar 21, 2017 2:54 am
by kaz
I have not realized the synchronization of the force plate yet.

If you use "OptiTrack Peripheral Example" as it is, you can monitor it on the Editor panel,
and the value is saved in the Take file.
However, the force plate (6ch) can be monitored but can not be saved.
This has the following two patterns.

1.Value not saved in Take file (empty)
2.Values are saved in the Take file but all are 0

What is the best way to record force plate data?
Is it possible for AMTI to tell me how to fill in frame data?

Thanks for the answer !