Page 1 of 3

NatNet - Android data streaming

Posted: Mon Nov 04, 2013 2:31 am
by johny3212
Hello,
my name is Jan. I am working with OptiTrack system. I developed easy client application based on OpenGL and C++ in Eclipse. This app can connect to NatNet server running in Motive software and shows Rigid Body position in 3D. It was easy maybe 2 days.
Next I need developed some similarity client for Android system. Android is new for me because I am C++ developer. So I don't know how to link NatNet c++ libs with Java in Android. Is it possible to create some wrapper for NatNet or I will have to create myself wrapper packet client without NatNet libs in Android? For future I want to use Unity3D with Android and create client.
How is best way to connect running NatNet server in Motive from Android? It is very important for me. Than you for your response.

Re: NatNet - Android data streaming

Posted: Tue Nov 19, 2013 6:04 am
by 0xflarion
Hi Johny3212,

have you been able to solve this issue? I'm currently working on a similiar problem: I want to stream tracking data to an Android client. Hence, i would really appreciate it, if you could post your solution or give me some information about it :)

Thanks,
Flarion

Re: NatNet - Android data streaming

Posted: Thu Nov 21, 2013 4:25 pm
by NaturalPoint-Dustin
Hi there,

The NatNet SDK contains a direct depacketization sample (PacketClient.cpp), that shows how to decode NatNet UDP packets directly without needing NatNet lib. If you updated your plugin to use this approach, you could then recompile for Unix (Linux/android/etc).

Alternatively, you could use the script only path from my earlier post. This script may need to be updated to be compatible with the current Motive 1.5 bitstream syntax. Again, the PacketClient.cpp sample in the latest NatNet SDK shows how to decode the UDP packets directly and correctly.

Hope this helps,

Re: NatNet - Android data streaming

Posted: Wed Apr 27, 2016 6:56 am
by ml-7
Hallo,
I am trying to communicate with Motive:Tracker 1.9 from Java application.
Could someone please share the code for some basic functionality?

I tried NetNatML.dll using JNI (Java Native Interface) but no functions could be found.
I also failed with porting some depacketization methods from PacketClient.cpp.

Re: NatNet - Android data streaming

Posted: Wed Apr 27, 2016 11:33 am
by steven.andrews
Hello ml-7,

Thank you for reaching out to the community regarding your work.

Unfortunately, we do not have a version of the NatNet libraries that is directly compatible with Java, so using direct depacketization will be the required method.

It sounds like you have struggled with the direct depacketization. If you copied the code directly from the PacketClient sample, there may be additional formatting that is needed in order to make the code Java compatible. Unfortunately, I am not able to provide assistance with this conversion since we do not work with Java.

I hope you are able to work this out. If I come across any other resources that might help, I will let you know.

Best regards,
Steven
--
Steven Andrews
OptiTrack | Senior Customer Support Engineer

Re: NatNet - Android data streaming

Posted: Sat Apr 17, 2021 12:46 am
by Shown
johny3212 wrote: Mon Nov 04, 2013 2:31 am Hello,
my name is Jan. I am working with OptiTrack system. I developed easy client application based on OpenGL and C++ in Eclipse. This app can connect to NatNet server running in Motive software and shows Rigid Body position in 3D. It was easy maybe 2 days.
Next I need developed some similarity client for Android system. Android is new for me because I am C++ developer. So I don't know how to link NatNet c++ libs with Java in Android. Is it possible to create some wrapper for NatNet or I will have to create myself wrapper packet client without NatNet libs in Android? For future I want to use Unity3D with Android and create client.
How is best way to connect running NatNet server in Motive from Android? It is very important for me. Than you for your response.
Hi there I am newbie here.

You need to write an Java Native Interface(JNI) to be able to call the native(c/c++) libraries from Android Java code.
The hierarchy is like:

+++++++++++++++++++++++++++++++++++
| Android Application |
+++++++++++++++++++++++++++++++++++


+++++++++++++++++++++++++++++++++++
| Android Application Framework |
+++++++++++++++++++++++++++++++++++


+++++++++++++++++++++++++++++++++++
| Java Native Interface |
+++++++++++++++++++++++++++++++++++


+++++++++++++++++++++++++++++++++++
| C/C++ Native Libraries |
+++++++++++++++++++++++++++++++++++

Re: NatNet - Android data streaming

Posted: Tue Oct 26, 2021 7:38 pm
by its john
0xflarion wrote: Tue Nov 19, 2013 6:04 am Hi Johny3212,

have you been able to solve this issue? I'm currently working on a similiar problem: I want to stream tracking data to an Android client. Hence i would really appreciate it, if you could post your solution or give me some information about it :)

Thanks,
Flarion
yes, one solution is to download data.

Re: NatNet - Android data streaming

Posted: Fri Nov 12, 2021 1:19 am
by miya
Well, I think that NatNet clients can discover what data objects a server application is currently streaming out of band or ahead of time using the
DataSetDescriptions structure. NatNet clients receive actual data from a server using the FrameOfMocapData structure. Both of
these packets are delivered to the client via the DataHandler callback.

According to me, connect running NatNet server in Motive from Android can be tricky.
All the best John!
whatsapp mod

Re: NatNet - Android data streaming

Posted: Mon Jan 03, 2022 6:52 am
by muzmalik98
Hi Johny3212,

have you been able to solve this issue? I'm currently working on a similar problem.I want to stream tracking data to an Android client. Hence i would really appreciate it, if you could post your solution or give me some information about it :)

Thanks,

Re: NatNet - Android data streaming

Posted: Sat Jan 29, 2022 4:02 am
by Andrew125
johny3212 wrote: Mon Nov 04, 2013 2:31 am Hello,
my name is Jan. I am working with OptiTrack system. I developed easy client application based on OpenGL and C++ in Eclipse. This app can connect to NatNet server running in Motive software and shows Rigid Body position in 3D. It was easy maybe 2 days.
Next I need developed some similarity client for Android system. Android is new for me because I am C++ developer. So I don't know how to link NatNet c++ libs with Java in Android. Is it possible to create some wrapper for NatNet or I will have to create myself wrapper packet client without NatNet libs in Android? For future I want to use Unity3D with Android and create client.
How is best way to connect running NatNet server in Motive from Android? FM Whatsapp 2023It is very important for me. Than you for your response.
Is this system assosiated with IOS by any mean??, cause I am apple user here. And you can connect Natnet server by using PacketClient.cpp.
Thank you.