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:
prints:[font:Courier New]theClient->SendMessageAndWait("TestRequest", &respones, &nBytes);[/font]
What does this mean to me? It also returns [font:Courier New]ErrorCode_Other[/font] (4).[font:Courier New][Client] Server returned NAT_UNRECOGNIZED_REQUEST.[/font]
I couldn't find error code's listed in the API documentation.
Also, this function
is never called, I see that it is added to call backs in[font:Courier New]DataHandler(sFrameOfMocapData* data, void* pUserData){...}[/font]
[font:Courier New]CreateClient(int iConnectionType)[/font] with this line:
Which if I understand correctly should call DataHandler() each time the data is updated.[font:Courier New]theClient->SetDataCallback( DataHandler, theClient );[/font]
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]