250a Haptics Lab

From CCRMA Wiki
Revision as of 09:45, 21 October 2009 by Eberdahl (Talk | contribs)

Jump to: navigation, search

The goal of this lab is to introduce three-dimensional active force feedback. Each haptic effect can easily be coupled to a sound because the feedback loop is controlled directly Pd. Different haptic effects suggest different sounds; different sounds suggest different effects. What are the most interesting mappings? Which are appropriate, controllable, even "expressive". Try each sound control with and without haptic feedback enabled. Are there some that simply cannot be played without haptics?

Falcon.jpg


Part 0: Setup

  • Install the new and improved .pdsettings file on your CCRMA linux account according to the directions on this page.


  • Add the following line to your ~/.bashrc file. (If you want to use emacs to do this, type emacs ~/.bashrc)

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/ccrma/courses/250a/pd/externs


  • You may wish to verify that no one has changed the wiring on your machine in the MAXLAB.
    • The Falcon should be connected over USB to the machine by way of a USB hub.
    • A -30V DC power supply should be plugged into the Falcon. The power supply has a yellow band on the end of the plug.


  • If you need to make a 250a directory, type

~> mkdir ~/250a

~> mv ~/Desktop/Falcon-pd-linux.zip ~/250a

  • Unzip the files by typing

~> cd ~/250a unzip Falcon-pd-linux.zip

Part 1: Test setup and run spring

  • Run 3D-spring.pd

~>cd ~/250a/Falcon-pd-linux/spring ~>pd 3D-spring.pd&

  • Test the spring governed by Fz = $f2(z0 - $f1). Fz is the force exerted by the motors in the z-axis, $f1 is the position of the Falcon grip in the z-axis, $f2 is the spring stiffness, and z0 is the rest position of the spring. In this example, we have z0 = 0.
  1. Check the messages in the Pd window to ensure that the Falcon has been initialized properly.
  2. Hold down the center button of the Falcon grip to enable haptics.
  3. Increase the stiffness of the spring from zero by dragging the number box.
  4. Make sure that you understand how the "expr" object works.

  5. In practice, the motors exert forces that are limited in magnitude, i.e. the Falcon limits the maximum force in both extremes, so the actual force as a function of position is slightly different from the idealized spring:
    Forceplot.png


  6. Try restricting the Falcon grip's motion to lie in a plane, a line, etc.
  7. What is the rest position for the spring in the X direction?
  8. Why is this rest position not equal to zero?
  9. Coords.png


Part 2: Wall

A wall is just like a spring that engages right as the user starts pushing into the virtual wall. The spring's rest position is the position of the virtual wall.

  1. Close the previous patch and load
    1D-wal.pd
    . (Don't try to open two patches at the same time that include the Falcon object! If pd crashes, you can kill all instances of it by typing
    killall pd
    in the terminal.)
  2. Try changing the stiffness of the virtual wall.
  3. How stiff is a real wall?
  4. Notice that the wall is implemented using a subpatch instead of expr. Look inside the subpatch to see how it is implemented.
  5. Rigid virtual objects can be represented using significantly stiff walls with complex geometries. This is how haptics can be used to help CAD designers study the shape of complex objects.