IS3D::VRPNTrackerDevice Class Reference

#include <VRPNTrackerDevice.H>

Inherits IS3D::PolledDevice.

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)
virtual ~VRPNTrackerDevice ()
void processEvent (const CoordinateFrame &vrpnEvent, int sensorNum)
std::string getEventName (int trackerNumber)
void pollForEvents ()
void setFinalOffset (int trackerNumber, CoordinateFrame &finalOffset)

Static Public Member Functions

static VRPNTrackerDevicefromConfigVals (const std::string &devname)

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 setting the ConfigVal VRPNTrackerDevice_PrintSensor0 to 1.

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

IS3D::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 

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

Member Function Documentation

static VRPNTrackerDevice* IS3D::VRPNTrackerDevice::fromConfigVals ( const std::string &  devname  )  [static]

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

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

void IS3D::VRPNTrackerDevice::pollForEvents (  )  [virtual]

Implements IS3D::PolledDevice.

void IS3D::VRPNTrackerDevice::setFinalOffset ( int  trackerNumber,
CoordinateFrame &  finalOffset 

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

Generated on Wed Jan 26 06:31:21 2011 for IS3D by  doxygen 1.5.6