NatNet - Android data streaming

NatNet, VRPN, TrackD, and Plugins
Post Reply
johny3212
Posts: 10
Joined: Wed Oct 02, 2013 3:39 am

NatNet - Android data streaming

Post by johny3212 » 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.

0xflarion
Posts: 1
Joined: Tue Nov 19, 2013 5:50 am

Re: NatNet - Android data streaming

Post by 0xflarion » 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

NaturalPoint-Dustin
Posts: 609
Joined: Tue Mar 19, 2013 5:03 pm

Re: NatNet - Android data streaming

Post by NaturalPoint-Dustin » Thu Nov 21, 2013 4:25 pm

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,
Dustin
Technical Support Engineer
OptiTrack | TrackIR | SmartNav

ml-7
Posts: 5
Joined: Wed Apr 27, 2016 6:30 am

Re: NatNet - Android data streaming

Post by ml-7 » Wed Apr 27, 2016 6:56 am

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.

steven.andrews
NaturalPoint Employee
NaturalPoint Employee
Posts: 669
Joined: Mon Jan 19, 2015 11:52 am

Re: NatNet - Android data streaming

Post by steven.andrews » Wed Apr 27, 2016 11:33 am

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

Shown
Posts: 3
Joined: Sat Apr 17, 2021 12:28 am

Re: NatNet - Android data streaming

Post by Shown » Sat Apr 17, 2021 12:46 am

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. Thisgbwhatsapp 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 |
+++++++++++++++++++++++++++++++++++

its john
Posts: 2
Joined: Tue Oct 26, 2021 7:21 pm

Re: NatNet - Android data streaming

Post by its john » Tue Oct 26, 2021 7:33 pm

thanks for sharing info about android data streaming .streaming video and music share unblocked games can eat lot of data.the breakdown is to download like gbwhatsapp.
Last edited by its john on Sat Oct 30, 2021 2:32 am, edited 1 time in total.

its john
Posts: 2
Joined: Tue Oct 26, 2021 7:21 pm

Re: NatNet - Android data streaming

Post by its john » Tue Oct 26, 2021 7:38 pm

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.

miya
Posts: 1
Joined: Fri Nov 12, 2021 1:15 am

Re: NatNet - Android data streaming

Post by miya » Fri Nov 12, 2021 1:19 am

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

Post Reply