[vtkusers] haptic devices
Chris Volpe
cvolpe at ara.com
Fri Jul 16 19:46:22 EDT 2004
Rusty Blue (now at Kitware) and I have spent a few years working with
the PHANToM in VTK while we were working at GE-CRD (now GE Global
Research). We developed a VTK wrapper on top of GHOST that utilized
multiple threads and synchronization primitives to communicate between
the 1000Hz haptic loop and the 30 (or so) Hz VTK/Tcl/Tk GUI and
rendering loop. We didn't use any vtk renderer callbacks, but we did
have a Tk timer event that would invoke a method in our wrapper that
would update positions and orientations of virtual objects under
synchronized access with a critical section object. Then it would render
and reset the timer to trigger again. I don't recall the specifics of
the Tk timer stuff, but I remember it was a bit tricky because,
depending on which version of Tcl/Tk we were running, the timer code
would either chew up the CPU, or wouldn't allow mouse/keyboard events to
be processed in a timely fashion, or some other such weirdness.
Chris
> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
Behalf
> Of Akshay Sthapit
> Sent: Friday, July 16, 2004 7:12 PM
> To: Sean Richards; vtkusers at vtk.org
> Subject: Re: [vtkusers] haptic devices
>
> Hi
>
> I'm using vtk with the phantom with the HDAPI.
>
> I don't know if there's another/better way, but I'm using callbacks
> from vtk renderer to schedule synchronized callbacks to get thread
safe
> positions of the end effector of the haptic device.
>
> The end result is that the cursor moves moves around the screen at
> about 30Hz, while the haptic device scheduler runs at 1000Hz. The
> synchronized callback ensures thread safety coz you're running at 2
> different rates.
>
> Hope that helps.
> Akshay
>
> --- Sean Richards <sean at millwood.ca> wrote:
> > Does VTK support any haptic devices? If so, which ones?
> >
> > Thanks in advance!!
> >
> > Sean> _______________________________________________
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Vote for the stars of Yahoo!'s next ad campaign!
> http://advision.webevents.yahoo.com/yahoo/votelifeengine/
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list