[vtkusers] Support for 3D trackers and 3D mice

David Gobbi dgobbi at irus.rri.on.ca
Tue Dec 12 14:55:44 EST 2000


On Tue, 12 Dec 2000, Marco Petrone wrote:

> Last summer I read about some work for supporting 3D trackers with VTK.
> Has anyone any update/reference about this argument.

Hi Marco,

I've written classes to support three devices so far:
- the Logitech 3D mouse (uses ultrasound for localization)
- the Flock of Birds (magnetic)
- the POLARIS (optical, high-precision)

We use the Flock of Birds and POLARIS regularly, and the code
for these devices is stable.  The Logitech driver hasn't had
as much testing.  The classes for all three devices works under
Windows and Linux, and have been minimally tested under IRIX as
well.

I can provide you with the base classes (there are three, vtkTracker,
vtkTrackerTool and vtkTrackerBuffer) if you are interested in
adding support for your own 3D device.  As for the device-specific
classes (vtkPOLARISTracker, vtkFlockTracker, vtkLogitechTracker)
we would have to negotiate.  

If there is a lot of interest, I could possibly contribute the
vtkLogitechTracker (for their 3D ultrasound mouse) to VTK. 
Particularly if someone else was willing to be the one to
provide support for it, i.e. make sure the code doesn't go out-of-date
as new version of VTK come out.

Here is a very brief rundown on how the vtkTracker class works
(as a python example), each vtkTracker can have several 'tools,'
e.g. the Flock of Birds class supports up to 14 birds.

---
tracker = vtkTracker()
tracker.StartTracking()

transform = tracker.GetTool(0).GetTransform()

actor.SetUserTransform(transform)  # connect transform to an actor

tracker.Update()  # call this any time to update the transform 
---

There are also methods to inquire about the state of the
3D mouse buttons, to perform real-world-coordinate to
virtual-world-coordinate calibrations, etc. 

 - David

--
  David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario





More information about the vtkusers mailing list