[[Tutorial]]

#contents



**  Background [#q683cf2d]

Haptic feedback has been used in human robot interaction to provide the  signals intended for the proprioceptors of the operator, i.e., force and position. Such Specially dexterous manipulation of objects using hands or tools, depends heavily on the tactile feedback. For example, while cutting an apple using knife, stirring soup with a spoon etc; a feedback force is experience by the user than depends on the physical properties of both tool and the target object. 

In this tutorial, we shall simulate the feedback generated from the real world interaction with several objects.

-------
This tutorial is based on the work done by Mickael Nicolaccini, an intern at Inamura laboratory. 
If you questions after reading this page: Please feel free to email at::
{jain@nii.ac.jp, m.nicolaccini@gmail.com}

If you have any questions after reading this page: Please feel free to email at: sigverse-users@googlegroups.com

-------

**  Introduction [#wf2cb185]

The Phantom Omni device is used for this work. According to its [[website>http://geomagic.com/en/products-landing-pages/sensable]]:

"Each Geomagic haptic device accurately measures the 3D spatial position (along the x, y and z axes) and the orientation (pitch, roll and yaw) of its handheld stylus. The devices use motors to create the forces that push back on the user’s hand to simulate touch and interaction with virtual objects."

This device allows accurate capture of the movement and inclination of a pen shaped tool. This pen shaped tool is linked to an articulated arm which can generate feedback force using motors, thus the interaction is not only one sided but bi-directional. The person can influence the environment and the environment can react to it.

*** The Haptic device: phantom Omni [#m3804746]

The Phantom has 6 joints (see figure 1 and 2), with each joint capturing the degree of the inclination. Joints numbers 1 to 3 are equipped with 3 resistance motors, one by axis (x, y, z) so the device can apply feedback in space.

#ref(./haptick1.jpg,100%)
Figure1: Phantom Omni, where the pen shape tools is plugged. Source: Google

#ref(./hapticl2.png,100%)
Figure2: Inclination joints of Phantom Omni. Joints 4 to 6 are used to capture the inclination the device. Source: Google


** Requirements [#ad223c72]

*** Selection of PC [#vae303b9]
-A fast machine is needed for the rendering and computation purposes. For slower PC, it is noticed by some other users that stron vibration from the device is not obtained. 
-I was using the follow specifications:

WRITE DOWN SPECS

*** 1394 interface. [#ef7886c1]

IEEE 1394 called Firewire is a high speed I/O (made by Apple in 1995). In my Lenovo PC, the firewire is embedded in the PC itself. But if you have a separate board then depending on the PCI card type, you are required to install the device drivers. 

*** Installing of a Development Environment [#n25151cc]

VC++ 2008 and 2010, both can be used. Please download appropriate service libraries from [[here>http://www.sigverse.org/wiki/en/index.php?service%20libraries]]. If you have not implemented any SIGService so far and would like to understand its implementation via some simpler example, please follow [[this>http://www.sigverse.org/wiki/en/index.php?Creating%20a%20service%20provider]] tutorial. 


*** Download: (PHANTOM Device Drivers PDD) driver and library (OpenHaptics Toolkit) [#o7af91ff]

- Registration

--To download the Phantom  Device Drivers and OpenHaptic toolkit (official library for the phantom device), you are required to register. 

--Please go to this [[page>http://dsc.sensable.com/index.asp]] and click "OpenHaptics Academic Edition Developers" (unless you are a commercial developer). 

--This process requires you to input the Serial Number of your device. The password will be sent to you in some time. This may take even 2-3 days. 

- Installation 

--The curren version is 3.2.2. But for the current development of the SIGService, OpenHaptics Academic Edition for Windows - v3.1 is used. The folder contains OpenHaptics Academic Edition software, ReadMe, source code examples, PHANTOM® Device Drivers, and software and hardware documentation.

--Please install the Academic Edition software and PHANTOM® Device Drivers.


** Development of interaction of objects using Phantom Omni inside SIGVerse. [#g432fcfc]


*** Usage of OpenHaptic Micro API [#vc9f6af8]

#ref(./openhaptic.png,100%)
Figure 3: The levels of abstraction of the OpenHaptic Micro API. Source: Geomagic website. 

OpenHaptic is divided into several layers. For this project HDAPI (low level) and the HLAPI (high level) is combined. HLAPI allows, among other things, to select a feedback force type and their intensity. The highest layer QuickHaptics combines graphical rendering and feedback force management, whereas we only need feedback force management since graphical rendering is already provided by SIGViewer. That is why this layer is not used.

***Scheme of SIGService for Phantom Omni [#ka330538]

#ref(./scheme.png,100%)
Figure 4: The Scheme of the communication between the phantom Omni and the controller. Source: Mickael's internship report. 

The service works as a bridge between SIGViewer and the Phantom Omni,
merging the SIGService framework and the OpenHaptic API.


***Role of SIGService for Phantom Omni [#a6a6f198]

SIGService enables communication with a controller using sockets.
The role of the service is to capture movement, the inclination and state of buttons of the phantom Omni. Then data is sent as a string to the controller (yellow part on figure 4). 

The structure of the data consists of 3 floats for the position, 4 floats for the inclination and 1 integer for the buttons’ state.

When a collision or the end of a collision is detected, the controller sends the needed information (loaded from the entity collided) like feedback force type and their intensity to the Haptic service (green part on figure 4).


***Haptic environment simulation sample experiment. [#b0868938]

-The knife is controlled by the the pen-shaped tool of the haptic device. 
-The apple, bowl with liquid, a joystick pad, can, organge and the table are example items used to create feedback force. 
-The apple is squishy and simulates the cutting of a fruit. 
-The table has a hard spring effect that allows for modeling the sticking of the knife into the wooden furniture.
-The bowl has the liquid that is used to create a viscous effect.
-The black joystick pad creates a large boost force.
-The orange creates a bumper effect.


#ref(./hapticSample.PNG,50%);

*** Installation of SIGServer [#mad80522]

You are required to add few files inside your SIGServer source code. I will explain the modification process here. 

***SIGService Source code for the haptic device[#l18576d7]

#ref(./omni.gif);

$git clone [[git@socio4.iir.nii.ac.jp:~/SigverseGitServer/unstable/services/hapticService.git]]

***SIGController Source code and world file for sample experiment [#a8a6ae15]

|#ref(HapticCollisionpic1.PNG,,20%); |#ref(HapticCollisionpic2.PNG,,20%) ;|#ref(hapticSample.PNG,,20%); |#ref(HapticCollisionpic3.JPG,,20%) ;|

$ git clone [[git@socio4.iir.nii.ac.jp:~/SigverseGitServer/unstable/serverConfiguration/samplesForPhantomOmni.git]]


#highlight(end)

#counter

Front page   Edit Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes