OptiTrack Peripheral API

Post Reply
kaz
Posts: 4
Joined: Mon Mar 06, 2017 2:32 am

OptiTrack Peripheral API

Post by kaz » Mon Mar 06, 2017 2:43 am

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" ?

morgan
NaturalPoint Employee
NaturalPoint Employee
Posts: 200
Joined: Tue Jun 24, 2008 2:01 pm
Location: Corvallis, OR, USA
Contact:

Re: OptiTrack Peripheral API

Post by morgan » Tue Mar 07, 2017 2:41 pm

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,

Morgan

kaz
Posts: 4
Joined: Mon Mar 06, 2017 2:32 am

Re: OptiTrack Peripheral API

Post by kaz » Thu Mar 09, 2017 12:55 am

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,

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

morgan
NaturalPoint Employee
NaturalPoint Employee
Posts: 200
Joined: Tue Jun 24, 2008 2:01 pm
Location: Corvallis, OR, USA
Contact:

Re: OptiTrack Peripheral API

Post by morgan » Tue Mar 14, 2017 1:06 pm

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
fpcal.png (97.69 KiB) Viewed 1923 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?

morgan
NaturalPoint Employee
NaturalPoint Employee
Posts: 200
Joined: Tue Jun 24, 2008 2:01 pm
Location: Corvallis, OR, USA
Contact:

Re: OptiTrack Peripheral API

Post by morgan » Tue Mar 14, 2017 1:13 pm

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?

kaz
Posts: 4
Joined: Mon Mar 06, 2017 2:32 am

Re: OptiTrack Peripheral API

Post by kaz » Wed Mar 15, 2017 4:04 am

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.

kaz
Posts: 4
Joined: Mon Mar 06, 2017 2:32 am

Re: OptiTrack Peripheral API

Post by kaz » Tue Mar 21, 2017 2:54 am

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 !

Post Reply