当前位置:首页 >> 机械/仪表 >>

雷小永-ch5 触觉、力觉反馈


北京航空航天大学自动化科学与电气工程学院

虚拟现实技术及应用 Virtual Reality Technology & Application
雷小永 博士 leixiaoyong@hotmail.com 北京航空航天大学自动化学院 虚拟现实技术与系统国家重点实验室

第五章 触觉、力觉反馈 Haptic render

ing Touch / force feedback ——与视觉、听觉反馈结合,提高仿真度; ——视觉被打断(对象遮挡)、完全消失(黑暗环境); ——本章侧重于讨论与手、手腕相关的触觉反馈; BoeingDVD01-触觉演示.wmv, DVD2,DVD3,vps stanford Bonesim.wmv J10 DEMO; 珠海航展 BOEING 777 WALKTHROUGH.avi

Quantitative Task Performance

触觉资源
? ? ? ? ? ? ? ? ?

[1] IEEE World Haptics; [2] Open Source Haptics http://www.h3dapi.org [3] SensAble Technologies, Inc., “OpenHaptics toolkit”, http://www.sensable.com whitepaper [4] EuroHaptics ; [5] IEEE Haptics Symposium; [6] http://www.cyberglovesystems.com/

http://www.haptics-e.org/ 触觉电子杂志 http://www.chai3d.org/ 开源

Haptics-e is technically co-sponsored by The IEEE Robotics and Automation Society

?

Haptics?

http://touchlab.mit.edu/index.html --What is

第五章 触觉、力觉反馈
? ? ? ?

第一节 第二节 第三节 第四节

人类触觉机制 触觉反馈接口 触觉绘制流水线 通用触觉开放软件工具包

Haptic Interfaces Haptics… Comes from Greek Hapthai meaning the sense of touch; [生理] 触觉,触感;触摸感 ? Groups touch feedback and force feedback ?分为两类:触觉反馈(接触感觉, taction)、 ?力觉反馈(肌肉运动感知,kinesthesia,动感)
? [?kaini(:)s?θi:zj?]

Touch Feedback 触觉反馈 Relies on sensors in and close to the skin;皮肤感觉 ? Conveys information on contact surface geometry, roughness, slippage, temperature;传递接触面信息 ? Does not actively resist user contact motion;无阻力 ? Easier to implement than force feedback.易实现
?

Force Feedback 力觉反馈 Relies on sensors on muscle tendons and bones/joints proprioception;肌腱 、骨骼/关节本体感受; ? Conveys information on contact surface compliance, object weight, inertia;接触面柔顺性、 重量、惯性等; ? Actively resist user contact motion;有阻力 ? More difficult to implement than touch feedback (no commercial products until mid 90s).相对难实现
?

Haptic Interfaces Human touch sensing mechanism人类触觉机制 ? Most touch sensors are on the hand (much less density on other parts of the body);集中在手部 ? Four primary types of sensors: 四类传感器
40 % are Meissner’s corpuscles(细胞,触觉小体) – detect movement across the skin – velocity detectors,检测沿皮肤的运动,速度 25% are Merkel’s disks(盘 – measure pressure and vibrations 测压 13 % are Pacinian corpuscles – deeper in skin (dermis真皮) –帕西 尼氏小体,acceleration sensors. Most sensitive to vibrations of about 250 Hz 19% are Rufini corpuscles – detect skin shear and temperature Changes

Haptic Interfaces
角质层 外皮 真皮 皮下组织

Skin touch sensors 皮肤触觉感知

Haptic Interfaces Sensorial adaptation ? Measure the decrease in electrical signals from the skin sensor over time, for a constant stimulus; ? If the sensor produces a constant electrical discharge for a constant mechanical stimulus – It is called “Slow Adapting” (SA);慢适应 ? If the rate of electrical discharge drops rapidly over time for a constant stimulus – called “Rapidly Adapting” (RA);快适应

Haptic Interfaces Spatial resolution 空间分辨率; // 感受野 ? Measure the receptive field size of a sensor; ? If the sensor has a large receptive field – it has low spatial resolution (Pacinian and Ruffini) SA-II, RA-II ? If the receptive field is small – has high spatial resolution (Meissner and Merkel) SA-I, RA-I

Haptic Interfaces

Two-point limen(阈限) test: 2.5 mm fingertip, 11 mm for palm, 67 mm for thigh(大腿,股 );空间分辨率;

Haptic Interfaces

Haptic Interfaces

Human grasping configurations人类抓握几何; Prehensile 适于抓住的; Prismatic 柱状

Haptic Interfaces Maximum and sustained force exertion 用力 ? Maximum force exerted during “power” grasp Averages 400 N (male) and 225 N (female); ? Looking at body location, force output ?Grows from 50 N at PIP finger joint, to 100 N at shoulder; ? Sustained force feedback is much smaller than maximum, owing to fatigue and pain 疲劳、疼痛

Haptic Interfaces

Fatigue measured as a function of % Maximum Voluntary Contraction (MVC) and rest cycle 疲劳测量---最大随意收缩—力的测度;

Haptic Interfaces Haptic feedback actuators 执行机构 ? Need to maximize power/weight ratio; ? Need to have high power/volume ratio; ? Need to have high bandwidth;--1K ? Need to have high dynamic range (fidelity); ? Need to be safe for the user - None of the current actuator technology satisfies all these requirements
功率重量比 ;当前没有全部满足需求的;

Haptic Interfaces

Actuator comparison based on P/W ratio; 直流电机、气动、液压执行器

Touch Feedback Interfaces… 触觉接口 Can be desk-top or wearable (gloves); ? touch feedback mouse; ? CyberTouch glove; ? Temperature feedback actuators;
?

Hardware Issues 硬件问题
The haptic devices are worn by a human which attaches to the arm and/or hand and which measures the operator‘s movements so they can be mimicked by a remote manipulator. A force-reflecting device can additionally make the operator feel the forces measured by the remote manipulator. // 测量胳膊或者手的运动 ?Hardware Design: ?Finger-based systems ?Hand-based systems ?Exoskeletal systems ?Inherently passive devices.

一种参考的分类方法;

Haptic Interfaces

Harmonic Drive 谐波驱动

The iFeel Mouse (0-125 Hz).

Haptic Interfaces
6 individually Controlled Vibro-tactile actuators 震动触觉 0-125 Hz frequency 1.2 N amplitude at 125 Hz

CyberTouch Glove (Virtex); http://www.cyberglovesystems.com/

Haptic Interfaces
At this point, you will see the advanced calibration dialogue. You may click on the image of the CyberGlove on any of the sensors (marked with big yellow dots) and use the two sliders (one for adjusting sensor gain and one for adjusting sensor offset) to tweak the calibration. During this process you will see the result of your calibration in the device viewer in the main application window. 调整传感器增益;偏移;

Haptic Interfaces

手部信息调整 增益,偏移;

Haptic Interfaces

震动反 馈调节

Haptic Interfaces

Camera system of coordinates

T 3? fingertip T 2? 3 (t) T 1? 2 (t), T palm? 1 (t)

y T global ? fingertip (t) z x T global ?W(t) T W ?source
Source system of coordinates World system of coordinates

T W ?palm (t)

Receiver system of coordinates

T global ? fingertip (t) = T global ?W(t) T W ?source T source ?palm (t) ? T palm? 1 (t)T 1? 2 (t) T 2? 3 (t) T 3? fingertip

Haptic Interfaces

Virtual Fit and Assembly

Virtual-Virtual Haptic Feedback and Why it Wasn’t Enough--University of California San Diego

Temperature feedback 温度反馈 Added simulation realism by simulating surface thermal “feel”; 热感-增加仿真真实感 ? No moving parts; ? Uses thermoelectric pumps made of solid-state materials sandwiched between “heat source”(热源 ) and “heat sink”(散热器 ); 热电泵 ? Single pump can produce 65°C differentials;
? 单极泵

Temperature feedback actuator

User comfort zone 13-46°C 用户舒适带

If system fails Heat travels back Through the pump And can burn Skin 系统故障-灼伤 皮肤 Temperature feedback actuator control

Force Feedback Interfaces… Need mechanical grounding to resist user motion; 需要机械接地--抵制用户运动; ? Can be grounded on desk, wall, or on user body; ? More difficult to construct and more expensive Than tactile feedback interfaces 比触觉难,更贵
?

Haptic Interfaces

The PHANToM used for 3D “sculpting” (courtesy of SensAble Technology Co.) haptics phomes DCD - Scottish TV.avi

capstan ['k?pst?n] n. 绞盘,起锚机;主动轮

PHANToM Omni

PHANToM Comparison

PHANToM 1.6/3.0

PHANToM 1.6/3.0

PHANToM 1.6/3.0

PHANToM 1.6/3.0

PHANToM 1.6/3.0

sigma.7 Haptic Device

HAPTIC DEVICES > sigma.x 7 active degrees-of-freedom > omega.x versatile desktop design

http://www.forcedimension.com/
Swiss Design and Manufacturing

> delta.x performance and modularity

sigma.7 Haptic Device

http://www.forcedimension.com/
Swiss Design and Manufacturing

Omega Haptic Device 3 DOF Force Feedback

Delta Haptic Device 3 DOF Force Feedback

Delta Haptic Device 6 DOF Force Feedback

? 3 DOF ? End-effector replaceable ? Resolution 0.009 mm ? Max continuous force 12 N ? Stiffness 14.5 N/mm ? Connectivity USB 2.0/PCI ? full gravity compensation ?Real-time safety (velocity monitoring and electromagn. brakes)

? 3 DOF (36 cm diam ? 30 cm) ? Resolution .03 mm ? Max continuous force 20 N ? Stiffness 14.5 N/mm ? Connectivity PCI ?Real-time safety (velocity monitoring and electromagnetic brakes)

? 6 DOF (36 cm diam ? 30 cm) ? ?20o /axis ? Resolution .03 mm, 0.04o ? Max continuous force 20 N ? torques continuous 0.2 Nm ? Stiffness 14.5 N/mm ? Connectivity PCI ?Real-time safety (velocity monitoring and electromagnetic brakes) ?监控速度,电磁制动

NOVINT FALCON 3 DOF Force Feedback
? 3 DOF (right-left, forward/backward, up/down) 75 ?75 ? 75 mm ? rumble, vibrations ?3D exploration and textures ? Dynamic effects (inertia, weight, momentum) ? Cost less than $300 ? Resolution >0.06 mm ? Max continuous force 10 N ? Stiffness 5 N/mm ? Connectivity USB 2.0 ? 1 kHz control bandwidth

?http://home.novint.com/ ?最近游戏用的较多;

NOVINT FALCON

视频演示: NOVINT FALCON 公司的虚 拟现实力反馈手柄.flv

The Haptic Master
3 DOF cylindrical robot Max force output 250 N Stiffness 50 N/mm Uses force-in, position-out Arrangement 圆柱坐标型机器人 筒状机器人 DEMO: haptic Master-BBC.mpg

Exoskeleton 外骨骼 over CyberGlove)

Cables and pulleys 滑轮;皮带轮 16 N/finger (continuous?); Weight 539 grams; remote electrical actuators in a control box. The CyberGrasp force feedback glove CyberGlove System - 3D Interaction4.flv

The CyberGrasp force feedback glove

Cam 凸轮 前凸盘,前三角

Haptic Interfaces

CyberGrasp glove Electronic interface box

Tether Wrist Tracker

The CyberPack (courtesy of Virtex Co.)

6 DOF mechanical arm Wrist position and Force feedback – No need for a tracker; 机械臂

Allows simulation of weight and inertia, not possible with glove-only interfaces CyberForce interface (introduced recently)

Haptic Interfaces

CyberForce interface CyberGlove System - 3D Interaction2-haptic workstation.flv Haptic-Rehab Post-Stroke Rehabilitation System using-中风康复

Haptic Interfaces

FCU 电路示意图

The VR physical modeling:

from (Burdea 1996)

The Haptics Rendering Pipeline
Traversal
Collision Detection Force Calculation

Force
Force Smoothing Force Mapping

Tactile
Haptic Texturing

Display

Application
Scene Traversal View Transform

Geometry
Lighting Projection

Rasterizer Display
Texturing

adapted from (Popescu, 2001)

The Haptics Rendering Pipeline
Traversal
Collision Detection Force Calculation

Force
Force Smoothing Force Mapping

Tactile
Haptic Texturing

Display

Collision detection:
Uses bounding box collision detection for fast response; ? Two types of bounding boxes, with fixed size or variable size (depending on enclosed object orientation). ? Fixed size is computationally faster, but less precise
?
Variable size Bounding Box Fixed size Bounding Box

Collision Detection

Undetected collision
Ball at time t Longest distance

Ball at time t + 1/fps

If longest distance d < v ? 1/fps then collision is undetected (v is the ball velocity along its trajectory)

Two-stage collision detection:
?

For more precise detection, we use a two-stage collision detection: an approximate (bounding box ) stage, followed by a slower exact collision detection stage.

?
Bounding Box Pruning multi-body pairs

yes

Simulation

no

Pair-wise exact Collision Detection

Collision response

yes

?两步检测,先粗略,后精确; ?逐对精确检测

Exact collision detection

Surface cutting: 切削
? An extreme case of surface “deformation” is surface cutting. This happens when the contact force exceed a given threshold;
? When cutting, one vertex gets a co-located twin. Subsequently

the twin vertices separate based on spring/damper laws and the cut enlarges.
Mesh before cut
V1 Cutting instrument V2

Mesh after cut
V1 V2

Collision response – surface deformation

The Haptics Rendering Pipeline
Traversal
Collision Detection Force Calculation

Force
Force Smoothing Force Mapping

Tactile
Haptic Texturing

Display

Haptic interface

Haptic Interface Point

I -Haptic Interface Point Haptic Interface Point

Penetration distance Object polygon

穿透距离

均匀弹性体力输出

Force output for homogeneous elastic objects
F=

F max for d max ? d where F max is that haptic interface maximum output force
saturation
F max
t ec j ob d r Ha

{

K ? d,

for 0 ? d ? d max

ect j b to f o S

d max 1

d max 2

Penetration distance d

Force Calculation – Elastic objects with harder interior
F= K 1 ? d discontinuity + K 2 ? (d –d discontinuity), for d discontinuity ? d F max for d max ? d where d discontinuity is object stiffness change point
F F max

{

K 1 ? d,

for 0 ? d ? d discontinuity

d discontinuity

d max

Penetration distance d

Force Calculation – Virtual pushbutton
F = K 1 ? d (1-um) + F r ? um + K 2 ? (d – n) un where um and un are unit step functions at m and n

F

Fr m n

Virtual wall Penetration distance d

Residual,剩余的;残留的力;

Force Calculation – Plastic deformation 塑性变形

m

m

n

F initial = K ? d for 0 ? d ? m F = 0 during relaxation,

F subsequent = K 1 ? d ? um for 0 ? d ? n F = 0 during relaxation, where um is unit step function at m

松弛--应变保持不变,应力随时间增加而降低的现象

Virtual wall V?0 F

Moving into the wall

Force Calculation – Virtual wall
time Generate energy due to sampling timeTo avoid system instabilities we add a damping term

Virtual wall V?0

Moving away from the wall F

F=

{

K wall ? ? x + B v, K wall ? ? x, 方向阻尼器

for v ? 0 for v ? 0

where B is a directional damper
time

The Haptics Rendering Pipeline
Traversal
Collision Detection Force Calculation

Force
Force Smoothing Force Mapping

Tactile
Haptic Texturing

Display

Force shading:

Non-shaded contact forces

Real cylinder contact forces

Contact forces after shading

F smoothed =

{

K object ? d ? N , for 0 ? d ? d max F max ? N,
for d max < d

where N is the direction of the contact force based on vertex normal interpolation

The haptic mesh:
? A single HIP is not sufficient to capture the geometry

of fingertip-object contact; (haptic interface point) ? The curvature of the fingertip, and the object deformation need to be realistically modeled.
Screen sequence for squeezing an elastic virtual ball

Haptic mesh

Mesh point i

网格点

Penetration distance for mesh point i

穿透距离

Haptic mesh force calculation

Penetration distance for mesh point i

Haptic Interface Point i

For each haptic interface point of the mesh:

of the contact polygon

F haptic-mesh i = K object ? d mesh i ? N surface where d mesh i are the interpenetrating distances at the mesh points, N surface is the weighted surface normal

The Haptics Rendering Pipeline
Traversal
Collision Detection Force Calculation

Force
Force Smoothing Force Mapping

Tactile
Haptic Texturing

Display

Force mapping

Force displayed by the Rutgers Master interface: F displayed = (? F haptic-mesh )? cos? where ? is the angle between the mesh force resultant and the piston

The Haptics Rendering Pipeline
Traversal
Collision Detection Force Calculation

Force
Force Smoothing Force Mapping

Tactile
Haptic Texturing

Display

Tactile mouse

Tactile patterns produced by the Logitech mouse
Force

Time ?

Time ?

Time ?

haptic mouse texture simulation

Surface haptic texture produced by the PHANToM interface

Haptic interface
Haptic Interface Point Y

F texture = A sin(m x) ? sin(n y),
X

Z

Object polygon

where A, m, n are constants: ? A gives magnitude of vibrations; ? m and n modulate the frequency of vibrations in the x and y directions

?

G. Burdea, The Role of Haptics in Physical rehabilitation, Chapter 25 in (Lin and Otaduy Eds.)

?

Haptic Rendering: Algorithms and Applications, AK Peters, Wellesley, MA,
May 2008 pp 517-529.

?

相关触觉软件

VHT---cyberglove
Virtual Hand SDK Virtual Hand Toolkit (VHT) To develop an application that makes use of Virtual Technologies’ whole-hand input devices, the software designer is provided with an application model that consists of three major components:

? Virtual human hand ? Object manipulation and interaction ? Rendering

All purchased VTi hardware comes basic software (VirtualHand/Drivers) that includes the: Device Configuration Utility, Device Manager and the Device layer part of the Virtual Hand Toolkit. This includes VTi hardware support in the form of device proxy classes as well as a set of classes for doing 3D math and finally a set of exception classes. The basic device layer is described in detail in Chapter 4. .

The main functionality of the VHT, which is only included

when purchasing the Virtual Hand Toolkit,

interface, model import, human hand support (including grasping and ghosting). These classes are described in detail in Chapters 5-10.

is contained in the Core layer and includes both the haptic and neutral scene graphs, simulation support, collision

Virtual Hand Toolkit (VHT)
#include <vhandtk/vhtBase.h> #include <vhandtk/vhtCore.h> // Virtual Human Hand and CyberTouch instances, used by multiple functions. static vhtHumanHand *hand; static vhtCyberTouch *touch; // // Get joint angles from sensor information of the CyberTouch, using the hand master. // void getFingerAngles( double *angles ) { // Get the most recent data from the CyberTouch. hand->update(); // Collect the angles. for ( int i=0; i< 5; i++ ) { angles[i] = hand->getKinematics()->getAlpha(i); }

}

Virtual Hand Toolkit (VHT)
// // Generate demo effects for the CyberTouch, accordingly with the sensor informations. // void generateForces( double *angles, double *forces ) { forces[5] = 0.0; for ( int i=0; i< 5; i++ ) { // retraction if ( angles[i] < M_PI/4 || angles[i] > 5*M_PI/4.0 ) { forces[i] = .05; } // apply parabolic force else { forces[i] = (1- M_PI/16.0*( angles[i] - M_PI/2 )*( angles[i] - M_PI/2 )); } cout << forces[i] << " "; if ( forces[i] > forces[5] ) { forces[5] = forces[i]; } } cout << forces[5] << "\n"; cout.flush(); }

Virtual Hand Toolkit (VHT)
// // Send feedback effects to the CyberTouch. // void putForces( double *forces ) { // send force to motors touch->setVibrationAmplitude( forces ); } // // Main function for the demo. // int main( int argc, char *argv[] ) { char *handedness; GHM::Handedness gloveHandedness= GHM::rightHand; if ((handedness= getenv("VTIHANDEDNESS")) != NULL) { if (strcmp(handedness, "left") == 0) { gloveHandedness= GHM::leftHand; } }

Virtual Hand Toolkit (VHT)
try { // Connect to the glove. vhtIOConn *gloveDict = vhtIOConn::getDefault( vhtIOConn::touch ); // Expand the CyberGlove connection to the CyberTouch capabilities. touch = new vhtCyberTouch(gloveDict); // Connect to the tracker (use a null tracker for now). vhtTrackerEmulator *dummyTracker= new vhtTrackerEmulator(); // Create a Virtual Human Hand. double scale=1.0; hand = new vhtHumanHand( touch, dummyTracker, scale, gloveHandedness); } catch (vhtBaseException *e) { printf("Error: %s\nPress <enter> to exit.\n", e->getMessage()); getchar(); return 0; } // The finger tip angle in MCJ frame. double alpha[5]; double forces[6];

Virtual Hand Toolkit (VHT)
// // The demo loop: get the finger angles from the glove, calculate and apply // forces on the CyberTouch device consequently. // while (true) { getFingerAngles( alpha ); generateForces( alpha, forces ); #if defined(_WIN32) Sleep(100); #else usleep( 100000 ); #endif putForces( forces ); } return 0; }

H3D API 2.0
H3D API is an open-source, cross-platform, scenegraph API . H3D is written entirely in C++ and uses OpenGL for graphics rendering and HAPI for haptics rendering. H3D API uses the X3D standard for defining virtual environments and the Python scripting language can be used for more dynamical features in the scene. Using X3D and Python application prototypes can rapidly be developed and using C++ they can be optimized and get more advanced features.

HAPI 1.0
?HAPI is an open-source, cross-platform, haptics rendering engine written entirely in C++. ?It is device independent and supports multiple currently available commercial haptics devices. You can write your application once and not have to modify any code to use another haptics device. 无需修改 ?Choose between different rendering algorithms, different force effects and several kinds of surfaces to create the feeling that you want or create your own custom made effects. ?HAPI has been designed to be highly modular and easily extended.

Volume Haptics Toolkit, VHTK

Chai3D API
? Complete Library : Visualization and Force Feedback ? Support different commercially available hardware (Force dimension, Sensable, FCS). ? Allow virtualization of devices ? Really Open Source
Conti F, Barbagli F, Morris D, Sewell C. "CHAI 3D: An Open-Source Library for the Rapid Development of Haptic Scenes", IEEE World Haptics, Pisa, Italy, March 2005.

Chai3D API
Haptic Rendering Finger-Proxy model with variable radius Potential field models Static and dynamic friction models Stick-slip, viscous, vibration, magnetic effects Haptic Devices Universal haptic device handler Virtual haptic device omega.x and delta.x device support Novint Falcon device support Freedom 6 device support Phantom devices support Template for custom device integration

The OpenHaptics toolkit includes: ? ? ? ? the QuickHaptics micro API, Haptic Device API (HDAPI), Haptic Library API (HLAPI), Utilities, PHANTOM Device Drivers (PDD),

Source Code Examples, Programmer’s Guide and the API Reference.

OpenHaptics toolkit

A haptic frame

All haptic rendering commands in the HLAPI must be used inside a haptic frame. A haptic frame is bracketed at the start and end by calls to hlBeginFrame() and hlEndFrame() respectively. Explicitly marking the beginning and end of the haptic frame allows the API to properly synchronize changes to the state and to the rendering engine.

GHOST Toolkit for the PHANToM
? Provides realistic haptic interaction ? Provides and intuitive interfaces to haptics ? Provides a haptic scene graph aligned with 3D graphics APIs ? Provides an extensible environment for extending haptic interaction technologies ? Point haptic interaction with PHANTOM
? geometry based on user defined force models ? Geometry moves dynamically in response to forces
z y
(0,0,0)

x

PHANToM Desktop model

GHOST – Application interaction
Application Process Haptic Process

Scene Creation

Haptic Rendering Collision detection Collision response Haptic Servo loop adapted from Ghost SDK Programmer’s Guide (version 3.1)
y z
(0,0,0)

30 fps

Scene Rendering Haptic State Update

x

1000 Hz

Clean-up

The GHOST haptics scene graph
Application Process Haptic Process

Scene Creation

Haptic Rendering Collision detection Collision response Haptic Servo loop adapted from Ghost SDK Programmer’s Guide (version 3.1)
y z
(0,0,0)

30 fps

Scene Rendering Haptic State Update

x

1000 Hz

Clean-up

Haptic scene graph
? Provides a structured way to construct a haptic scene, including geometry and dynamics; ? is traversed only from top to bottom (unlike WTK); ? each node reachable by only one (unique) traversal from the root (a child node has only one parent node) ? Each node has its own transform (no separate transform nodes); ? cannot use pointers to repeat instances of the same object, since similar objects have different haptic interactions; ? Separator nodes to create a hierarchy – Transforms on the Separator affect its sub-tree;

GHOST node classes
gstNode gstTransform gstBoundedHapticObj gstShape gstPHANToM_SCP gstBoundary gstBoundaryCube gstCone gstCube gstForceField gstCylinder gstSphere gstTorus gstConstantForceField gstTriPolyMeshHaptic

gstSeparator gstPoint gstTransformMatrix gstVector

gstDynamic

gstDial gstButton gstSlider gstRigidBody

gstSpatialObject

gstPlane gstTriPolyBase gstTriPoly gstSpatialPartition gstBinTree gstTriPolyMeshBase gstTriPolyMesh gstEffect gstInertiaEffect gstBuzzEffect gstConstraint

gstPHANToM gstPHANToMDynamic gstPHANToMTranslation gstPHANToMRotation

3D support Static Nodes Dynamic Nodes Utility Classes

gstManipulator

gstTranslateManip gstScaleManip gstRotateManip

GHOST nine node classes

GHOST nine node classes (continued)

GHOST nine node classes (continued)

Scene graph example
y
Head

x y y z x
Right Shoulder Right Elbow x

y
Left Elbow

x z

y z
Left Shoulder

x

z

y z

z x

Torso

y
Body

x

z

Static scene graph – only separators and geometry nodes as leaves

GHOST code example:
#include <stdlib.h> #include <gstBasic.h> #include <gstSphere.h> #include <gstPHANToM.h> #include <gstSeparator.h> #include <gstScene.h> Main() gstScene *scene = new gstScene; gstSeparator *root = new gstSeparator; gstSphere *sphere = new gstSphere; Sptere -> setRadius(20); gstPHANToM *phantom = new gstPHANToM (``PHANToM name``); Root -> addChild(phantom); Root-> addChild(sphere); Scene-> setRoot(root); Scene -> startServoLoop(); While(!scene -> getDoneServoLoop()) // end application by calling scene -> stopServoLoop ();

Force calculation and dynamics
Application Process Haptic Process

Scene Creation

Haptic Rendering Collision detection Collision response Haptic Servo loop
y z
(0,0,0)

30 fps

Scene Rendering Haptic State Update

x

1000 Hz

Clean-up

adapted from Ghost SDK Programmer’s Guide (version 3.1)

Collision detection and response
? The scene graph contains at least one representation of the haptic interface through gstPHANToM node. There can be up to four such nodes (four haptic interfaces in one haptic scene) ? Collisions are detected between this node and the geometry nodes through the gstShape node that goes from “untouched” to “touched”; ? When collision exists, the gstPHANToM_SCP (surface contact point) is added to the scene graph. This node should be added to the scene graph under the same parent as gstPHANToM node.

Collision detection and response
? Forces are calculated following collision; ? Collision response through dynamic effects (movable nodes, solid body dynamics); ? Application informed if needed (user defined).
Normal Force (depends on spring and damper coefficients)

Friction Force (depends on static and dynamic friction coefficients)

摩擦力

Dynamic nodes
? The gstDynamic node adds movement ability to the geometry nodes beneath it. A subtree under a gstDynamic node represents one physically dynamic object. ? Forces generated by gstPHANToM node colliding with one of the geometries of such object are added to the state of the gstDynamic node ? Transformations (rotations, translations) are always applied to the gstDynamic node, not its children; ? It has four derived classes gstDial, gstButton, gstSlider and gstRigidBody.

Dynamic nodes (continued)
? When a gstDynamic node changes state, an event is generated which calls a user-defined callback function. ? Example – the application may quit if a gstButton changes state from pressed to released.

gstButton behavioral example

Updating the application
Application Process Haptic Process

Scene Creation

Haptic Rendering Collision detection Collision response Haptic Servo loop
y z
(0,0,0)

30 fps

Scene Rendering Haptic State Update

x

1000 Hz

Clean-up

adapted from Ghost SDK Programmer’s Guide (version 3.1)

Graphics and event callbacks
? The user selects which nodes have call-back functions, and what information needs to be sent back to the application; ? This way the application calls updateGraphics to have graphics information updated. Nodes that have a graphics call-back defined, and have a new state since the last call to updateGraphics will copy their current state to a defined data structure ? Call-backs pass new state information of the haptic scene nodes from GHOST haptics process to the application process; ? For example, the user can create a callback for the graphics representation of the position of the gstPHANToM node. This should change to callback of gstPHANToM_SCP after collision, so the user can see the location of the contact point on the object.

Mapping the user to the haptic scene
User workspace Phantom workspace

Camera mapping to PHANToM workspace
z-axis

phantomSep Transform M rotation

Phantom workspace

Camera

phantomSep Transform M camera

Ph wo ant rk om sp ac e

phantomSep Transform M zaxisOffset

Ph wo an rk tom sp ac e

from Ghost SDK Programmer’s Guide (version 3.1) Camera

Scaling camera and PHANToM workspaces

Phantom workspace Phantom workspace

Phantom workspace

Camera

Camera

Camera

Camera workspace too large

Camera workspace too small

Camera workspace appropriate

Scaling camera and PHANToM workspaces

Dxmax

Dphantomxmax

Camera

? The scale factor depends on the distance Dxmax from the focal point to the frustum ?The distance Dphantomxmax from the non-scaled PHANTOM workspace center to the side limit must also be determined ?The scale factor is then Sfrustum=Dxmax/Dphantomxmax

Scaling camera and PHANToM workspaces

? To maintain haptic fidelity, the gstShape node physical properties (compliance and damping) need to be scaled too; ? SurfaceKspringnew = SurfaceKspringcurrent/Sfrustum ? SurfaceKdampingnew = SurfaceKdampingcurrent/Sfrustum where SurfaceKspring and SurfaceKdamping are gstShape compliance and damping coefficients.


相关文章:
更多相关标签: