VRG3D::VRPNTrackerDevice Class Reference

#include <VRPNTrackerDevice.H>

Inherits VRG3D::InputDevice.

List of all members.

Public Member Functions

 VRPNTrackerDevice (const std::string &vrpnTrackerDeviceName, const Array< std::string > &eventsToGenerate, const double &trackerUnitsToRoomUnitsScale, const CoordinateFrame &deviceToRoom, const Array< CoordinateFrame > &propToTracker, const Array< CoordinateFrame > &finalOffset, const bool &waitForNewReportInPoll, const bool &convertLHtoRH=false)
virtual ~VRPNTrackerDevice ()
void processEvent (const CoordinateFrame &vrpnEvent, int sensorNum)
std::string getEventName (int trackerNumber)
void pollForInput (Array< EventRef > &events)
void setPrintSensor0 (bool b)


Detailed Description

Calibration Procedure:

1. Set TrackerUnitsToRoomUnitsScale to get everything in feet.

2. Adjust DeviceToRoom by printing out the position of sensor 0 until it reports the origin of RoomSpace in the correct place and +X, +Y, and +Z all point in the correct direction. You can print out the value of sensor 0 by calling printSensor0(true).

3. Use the TestTrackers function of the IS3D/programTemplate demo to draw the CoordinateFrame for each tracker. Adjust each tracker's PropToTracker transformation until it aligns itself with the RoomSpace frame when the tracker is held at the origin of RoomSpace.

Here's an easy way to think about it: Hold up each prop at the origin of RoomSpace in the orientation that you want to be considered "normal". Then, look at the drawing of its frame. For each of the vectors in its frame (X,Y,Z) that are shown, ask yourself, what is the RoomSpace vector that this arrow depicts? Then enter that value in the appropriate X,Y, or Z column in the PropToTracker frame.

4. For some of the props you may want the origin for the prop to be somewhere on the prop other than where the tracker is positioned. For these, measure the distance from the tracker to where you want the origin to be, call this vector V. Then, put this vector into the translation part of the PropToTracker frame. Be careful, the translation is applied after the rotation specified in the frame, so for example, if the first column of the frame is (0,1,0,0), you should put the Y component of V in that column, so it would become (0,1,0,Y[1]). If it were (0,-1,0,0), you would need to put (0,-1,0,-Y[1]).


Constructor & Destructor Documentation

VRG3D::VRPNTrackerDevice::VRPNTrackerDevice ( const std::string &  vrpnTrackerDeviceName,
const Array< std::string > &  eventsToGenerate,
const double &  trackerUnitsToRoomUnitsScale,
const CoordinateFrame &  deviceToRoom,
const Array< CoordinateFrame > &  propToTracker,
const Array< CoordinateFrame > &  finalOffset,
const bool &  waitForNewReportInPoll,
const bool &  convertLHtoRH = false 
)

virtual VRG3D::VRPNTrackerDevice::~VRPNTrackerDevice (  )  [virtual]


Member Function Documentation

void VRG3D::VRPNTrackerDevice::processEvent ( const CoordinateFrame &  vrpnEvent,
int  sensorNum 
)

std::string VRG3D::VRPNTrackerDevice::getEventName ( int  trackerNumber  ) 

void VRG3D::VRPNTrackerDevice::pollForInput ( Array< EventRef > &  events  )  [virtual]

Reimplemented from VRG3D::InputDevice.

void VRG3D::VRPNTrackerDevice::setPrintSensor0 ( bool  b  )  [inline]


The documentation for this class was generated from the following file:

Generated on Wed Jan 26 06:36:00 2011 for VRG3D by  doxygen 1.5.6