Not receiving position data with SimpleClient.

NatNet, VRPN, TrackD, and Plugins
Post Reply
JEIhrig
Posts: 3
Joined: Tue May 18, 2010 8:34 am

Not receiving position data with SimpleClient.

Post by JEIhrig »

Hello,

I'm relatively new to the natural point software. I was given a library that used the optitrack API to get position and orientation information from your optitrack software running on another computer. We were having trouble getting the names of the rigid bodies (We could only get the ID's.) So we have since updated the optitrack software to the latest version (2.2.0). This resulted in our library reading data incorrectly. I now need to update the library to work with your new API.

I grabbed the examples for the new API from your downloads section and attempting to run SampleClient. When I run it, the function call:
[font:Courier New]theClient->SendMessageAndWait("TestRequest", &respones, &nBytes);[/font]
prints:
[font:Courier New][Client] Server returned NAT_UNRECOGNIZED_REQUEST.[/font]
What does this mean to me? It also returns [font:Courier New]ErrorCode_Other[/font] (4).
I couldn't find error code's listed in the API documentation.

Also, this function
[font:Courier New]DataHandler(sFrameOfMocapData* data, void* pUserData){...}[/font]
is never called, I see that it is added to call backs in
[font:Courier New]CreateClient(int iConnectionType)[/font] with this line:
[font:Courier New]theClient->SetDataCallback( DataHandler, theClient );[/font]
Which if I understand correctly should call DataHandler() each time the data is updated.

However it never seems to get called which seems to indicate that no callbacks are happening.


After this point, it seems to read some data from the server just fine.
It recieves 4 Data Descriptions and prints them to the terminal. Including the names and ID's I've given the objects.

I'm not sure what to look at to fix it. The server is running on a 64 bit Windows 7 computer with version 2.20.0.0 of the tracking tools installed. The client is
running on a 32 bit windows XP computer.

Any insight would be appreciated.
Jim

Output from SimpleClient:
[font:Courier New]Connecting to server at 10.171.191.51...
Connecting from LocalMachine...
NatNet Sample Client (NatNet ver. 2.2.0.0)

[Client] Initializing using ethernet address: 10.171.191.66

[Client] Initializing command listener.

[Client] Initializing data listener.

[Client] Received command from 10.171.191.51: Command=1, nDataBytes=264

[Client] Connected. (HostApp:TrackingTools HostVer: 2.20.0.0 HostIP: 10.171.19
1.51 ()
[SampleClient] Server application info:
Application: TrackingTools (ver. 2.20.0.0)
NatNet Version: 2.2.0.0
Client IP:10.171.191.66
Server IP:10.171.191.51
Server Name:DEVSTATION51

Client initialized and ready.
[SampleClient] Sending Test Request

[Client] Requesting: TestRequest

[Client] Received command from 10.171.191.51: Command=100, nDataBytes=264

[Client] Server returned NAT_UNRECOGNIZED_REQUEST.
Recieved ErrorCode_Other


[SampleClient] Requesting Data Descriptions...
[Client] Received command from 10.171.191.51: Command=5, nDataBytes=141
[SampleClient] Received 4 Data Descriptions:
Data Description # 0 (type=1)
RigidBody Name : Ground Plane Marker
RigidBody ID : 1
RigidBody Parent ID : -1
Parent Offset : 0.00,0.00,0.00
Data Description # 1 (type=1)
RigidBody Name : Robot1
RigidBody ID : 2
RigidBody Parent ID : -1
Parent Offset : 0.00,0.00,0.00
Data Description # 2 (type=1)
RigidBody Name : Robot2
RigidBody ID : 3
RigidBody Parent ID : -1
Parent Offset : 0.00,0.00,0.00
Data Description # 3 (type=1)
RigidBody Name : Robot3
RigidBody ID : 4
RigidBody Parent ID : -1
Parent Offset : 0.00,0.00,0.00

Client is connected to server and listening for data...
[/font]
JEIhrig
Posts: 3
Joined: Tue May 18, 2010 8:34 am

Re: Not receiving position data with SimpleClient.

Post by JEIhrig »

I've also tried this on the same computer that the server is running on with the same results.

EDIT:
I also want to mention that I checked the return value of this:
[font:Courier New]theClient->SetDataCallback( DataHandler, theClient );[/font]
It returns 0 which the API indicates means the function returned successfully.
Last edited by JEIhrig on Tue Jun 08, 2010 10:56 am, edited 0 times in total.
Reason: Grammar
VincentG
Posts: 7728
Joined: Mon Jul 17, 2006 5:00 am
Location: Corvallis, Oregon

Re: Not receiving position data with SimpleClient.

Post by VincentG »

answered via email
wakabeast
Posts: 4
Joined: Wed May 18, 2011 10:45 am

Re: Not receiving position data with SimpleClient.

Post by wakabeast »

I have this same problem, can you send me the solution to this.

thanks
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: Not receiving position data with SimpleClient.

Post by NaturalPoint - Mike »

I think this could be an incompatibility between versions. You are using NatNet 2.2 and Arena 1.5. Arena 1.5 is meant to be used with NatNet 2.1.

Our downloads archive has all previous final releases, as well as release notes that can be used to match software and SDK versions.
wakabeast
Posts: 4
Joined: Wed May 18, 2011 10:45 am

Re: Not receiving position data with SimpleClient.

Post by wakabeast »

wakabeast
Posts: 4
Joined: Wed May 18, 2011 10:45 am

Re: Not receiving position data with SimpleClient.

Post by wakabeast »

Seems like Natnet( the streaming data software) works fine on my computer when i download it, but when i transfer it via usb to the non-networked computer, it doesn't work.
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: Not receiving position data with SimpleClient.

Post by NaturalPoint - Mike »

Just to make sure, this was resolved after updating Arena and NatNet, correct?
Post Reply