/usr/share/sofa/examples/Tutorials/Dentistry_Haptics/dentalSurgery_06b.scn is in sofa-data 1.0~beta4-11.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | <!--
Using LCP contact detection and resolution:
+ Added a driver for the Omni phantom device
+ Added a mechanical state controller that gathers data from the phantom and updates the position of a representation of the device in the simulation
+ Added a computation (LCPForceFeedback) of the haptic forces
+ Added VectorSpringForceField && JointSpringForceField to link the mouvements of the Omni phantom and the instrument
-->
<Node name="root" dt="0.005" showBehaviorModels="0" showCollisionModels="0" showMappings="0" showForceFields="0" >
<Object type="Gravity" name="G" gravity="0 -9.8 0" />
<Object type="CollisionPipeline" name="pipeline" depth="6" verbose="0"/>
<Object type="BruteForceDetection" name="detection" />
<Object type="CollisionResponse" name="response" response="FrictionContact" />
<Object type="LocalMinDistance" name="proximity" alarmDistance="0.3" contactDistance="0.15" angleCone="0.0" />
<Object type="MasterContactSolver"/>
<Object type="OmniDriver" scale="0.1" orientation="0 180 0"/>
<Node name="Tooth" >
<Node name="VisualModel" >
<Object type="OglModel" name="ToothVisualModel" fileMesh="data/mesh/tooth_closed.obj" color="white" />
</Node>
<Node name="CollisionModel" >
<Object type="MeshLoader" filename="data/mesh/tooth_closed.obj" />
<Object type="Mesh" name="ToothCollisionModel" />
<Object type="MechanicalObject" name="toothState" />
<Object type="Triangle" name="tooth" contactStiffness="100" simulated="0" moving="0"/>
<Object type="Line" name="tooth" contactStiffness="100" simulated="0" moving="0"/>
<Object type="Point" name="tooth" contactStiffness="100" simulated="0" moving="0"/>
</Node>
</Node>
<!-- ADDED: the Mechanical state Controller gathers events from the Omni driver and populates the Mechanical state -->
<Node name="Omni">
<Object type="MechanicalObject" template="Rigid" name="DOFs" position="1.2 1.6 -3.55 0 0 0 1"/>
<Object type="MechanicalStateController" template="Rigid" listening="true" mainDirection="-1.0 0.0 0.0" handleEventTriggersUpdate="true"/>
<Node name="RefModel">
<Object type="MeshLoader" filename="data/mesh/dental_instrument_centerline.obj" />
<Object type="Mesh" />
<Object type="MechanicalObject" name="instrumentCollisionState" rx="180" rz="150" dx="-1.2" dy="-1.6" dz="3.55"/>
<Object type="RigidMapping" />
</Node>
</Node>
<Node name="Instrument" >
<Object type="EulerImplicitSolver" name="ODE solver" rayleighStiffness="0.01" rayleighMass="1.0" />
<Object type="CGLinearSolver" name="linear solver" iterations="25" tolerance="1e-10" threshold="10e-10" />
<Object type="MechanicalObject" name="instrumentState" template="Rigid" position="1.2 1.6 -3.55 0 0 0 1"/>
<Object type="UniformMass" name="mass" totalmass="0.05" filename="BehaviorModels/dental_instrument.rigid" />
<Object type="LCPForceFeedback" activate="true" forceCoef="0.005"/> <!-- ADDED : Compute a force-feedback for the device -->
<Object type="UncoupledConstraintCorrection"/>
<Node name="VisualModel" >
<Object type="OglModel" name="InstrumentVisualModel" fileMesh="data/mesh/dental_instrument.obj" color="1.0 0.2 0.2 1.0" rx="180" rz="150" dx="-1.2" dy="-1.6" dz="3.55"/>
<Object type="RigidMapping" name="MM->VM mapping" object1="instrumentState" object2="InstrumentVisualModel" />
</Node>
<Node name="CollisionModel" >
<Object type="MeshLoader" filename="data/mesh/dental_instrument_centerline.obj" />
<Object type="Mesh" name="InstrumentCollisionModel" />
<Object type="MechanicalObject" name="instrumentCollisionState" rx="180" rz="150" dx="-1.2" dy="-1.6" dz="3.55"/>
<Object type="Triangle" name="instrument" contactStiffness="10" />
<Object type="Line" name="instrument" contactStiffness="10" />
<Object type="Point" name="instrument" contactStiffness="10" />
<Object type="RigidMapping" name="MM->CM mapping" object1="instrumentState" object2="instrumentCollisionState" />
</Node>
<Object type="VectorSpringForceField" object1="Omni/RefModel/instrumentCollisionState" object2="Instrument/CollisionModel/instrumentCollisionState" stiffness="10" viscosity="0" />
<Object type="JointSpringForceField" template="Rigid" name="joint springs" object1="Omni" object2="instrumentState"
spring="BEGIN_SPRING 0 0 KS_T 50 50 KS_R 500.0 500.0 KS_B 500.0 KD 0.0 END_SPRING" />
</Node>
</Node>
|