WorldViz User Forum  

Go Back   WorldViz User Forum > Precision Position Tracker (PPT)

 
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 02-14-2006, 10:39 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Have you downloaded the VRPN source code? It contains a few examples of connecting to a device and retrieving data from it. Here is a rough outline of what the code should look like:
Code:
void handle_pos(void *userdata, const vrpn_TRACKERCB t)
{
	printf("Marker %d: %.2lf, %.2lf, %.2lf\n",t.sensor,t.pos[0],t.pos[1],t.pos[2]);
}

//Create tracker object
vrpn_Tracker_Remote *tracker = new vrpn_Tracker_Remote("PPT0@YourMachineName");

//Setup callback for when new position data comes in
tracker->register_change_handler(NULL, handle_pos);

//Need to call this every frame to receive data
tracker->mainloop();

//Cleanup tracker when exiting
delete tracker;
The only way to get data from the PPT is either through VRPN or from the serial port using our own API. Our API is on our PPT download page.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:34 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC