NatNet 2.2 with TrackingTools 2.2.0 beta 1

NatNet, VRPN, TrackD, and Plugins
Post Reply
smith32
Posts: 11
Joined: Wed Mar 24, 2010 2:13 pm

NatNet 2.2 with TrackingTools 2.2.0 beta 1

Post by smith32 »

Hi,

I've developed a couple of applications that make use of the NAT_REQUEST_FRAMEOFDATA message. I know this isn't how streaming was intended but for the moment because I'm running a real-time operating system that executes code at a specific interval, this is the easiest way to pipe data into my application. I have applications that use both a packet client as well as using the NatNet 2.2 static library. Using the included SimpleServer application I tested my two clients and everything works, I'm able to retrieve data from the server by sending the NAT_REQUEST_FRAMEOFDATA command. When I try the exact same clients using the TrackingTools 2.2.0 beta 1 application I don't retrieve any info. I know it's not an issue with my clients now working when data is actually being streamed because I've turned streaming on with the SimpleServer and my clients still worked. I modified the SampleClient and PacketClient so that they don't display any data that is streamed, only data that is requested (i.e. only stuff that comes through the command port). I get the following results:


SampleClient:

Client initialized and ready.
[SampleClient] Sending Test Request

[SampleClient] Requesting Data Descriptions...[SampleClient] Received 1 Data Descriptions:
Data Description # 0 (type=1)
RigidBody Name : Trackable 1
RigidBody ID : 1
RigidBody Parent ID : -1
Parent Offset : 0.00,0.00,0.00

Client is connected to server and listening for data...
Most Recent Frame: 0Rigid Bodies [Count=0]
Most Recent Frame: 0Rigid Bodies [Count=0]

PacketClient:

[Client] received 'unrecognized request'
[Client] received 'unrecognized request'

So my question is, does the TrackTools server recognize the NAT_REQUEST_FRAMEOFDATA? In the PacketClient I'm receiving a message from the server with id=NAT_UNRECOGNIZED_REQUEST.

I'd really appreciate your feedback, thanks.
morgan
NaturalPoint Employee
NaturalPoint Employee
Posts: 199
Joined: Tue Jun 24, 2008 2:01 pm
Location: Corvallis, OR, USA
Contact:

Re: NatNet 2.2 with TrackingTools 2.2.0 beta 1

Post by morgan »

"So my question is, does the TrackTools server recognize the NAT_REQUEST_FRAMEOFDATA? In the PacketClient I'm receiving a message from the server with id=NAT_UNRECOGNIZED_REQUEST."

You are correct here - TrackingTools 2.2 Beta 1 does not recognize this request. Currently only Arena does. We can look into getting this into Tools before the Final.

Currently NatNet is really designed for streaming. Accessing frames by polling may have some side effects. Is there any way you can accumulate packets in your code using the regular NatNet frame delivery?
smith32
Posts: 11
Joined: Wed Mar 24, 2010 2:13 pm

Re: NatNet 2.2 with TrackingTools 2.2.0 beta 1

Post by smith32 »

Thanks for the response Morgan. Ya, I know this isn't the intended use of the streaming functionality but it was the most obvious and easiest way to get my application running. Believe me, I've been scratching my head trying to think of a way to receive the packets properly. However, my problem is that this is being run in real-time code with a fixed sample time so I can't have it just sit and wait for incoming packets. Having it poll the server is the easiest way because we don't have a blocking problem or have to worry about the timing between when a packet is streamed and whether the client will catch it. I'm going to play around with the possibility of creating another thread and see how that works.

Another option is to build the tracking tools into the client (take in calibration and tracking files) and get the info directly but I'd like to avoid that, feels like reinventing the wheel.

Thanks again Morgan and please pass along any suggestions. I'd also appreciate any feedback from other users, thanks.
smith32
Posts: 11
Joined: Wed Mar 24, 2010 2:13 pm

Re: NatNet 2.2 with TrackingTools 2.2.0 beta 1

Post by smith32 »

To follow up with this thread, I was able to successfully implement multicast receiving on a windows real-time target and a QNX (linux-like) real-time target using asynchronous polling. Those of you familiar with Simulink, I now have a block that receives rigid body data from TrackingTools. I definitely wouldn't have been able to do that without the awesome samples that are provided. Thanks a lot.
profiler_bg
Posts: 1
Joined: Fri Nov 02, 2012 3:26 am

Re: NatNet 2.2 with TrackingTools 2.2.0 beta 1

Post by profiler_bg »

Hi, I am using the event handler method for streaming, but need I need to get one frame by polling for initial pose setup. I'm using NatNetSDK 2.3 and Tracking Tools 2.5. What exactly is the code for polling for a frame and is it supported by this versions of Tracking Tools and Arena?
Post Reply