Haptic Symphony

Download source from here.

The video says it all.


About somapanam

Like violent gusts of wind the droughts that I have drunk have lifted me. Have I not drunk of Soma juice?
This entry was posted in Literature. Bookmark the permalink.

5 Responses to Haptic Symphony

  1. XMight says:

    I tried your demo. I observed the following:

    1. the toruses do not behave realistically, for example if I pick up one, an drop on top of a cylinder, they do not fall down, even if normally they must. You don’t use bullets discrete dynamic world, that’s the reason, or what?
    2. If I play with a torus around, I get kicked (Phantom Omni) very often. You aren’t using HD_NOMINAL_MAX_STIFFNESS? (I saw in your previous code that you assigned a value, but it was much bigger than the value recmmended for the Phantom. In my case it is 0.5, that is returned). Also, if you saw my demo video, you were able, maybe, to observe that the position of the cursor is far away from the position of the dragged object. This can be corrected with this stiffness, but as I say, you get kicks if you do so. I don’t know another way, you?
    3. I see that you use the amplification of the force -10.0, to move the objects (without button). At do the same way, but to be able to move something, I must amplify by -200. Well, I’m not very good in physics, but that’s how I was able to do the thing.
    4. Still the same problem with the HL_OBJECT_ANY when I compile your projects. In my project I use also this, but I don’t get the linker error, dunno why.
    5. I found that I can use btConvexPointCloudShape instead of btGImpact (I use also this collision shape), because I obtain very low collision performance (Sometimes 7-9 FPS, even if the PC is dual core, and High end GeForce video card). I will try to change this in my project.

    For the moment this is all 😉 Thank you for sharing.

    • somapanam says:

      I don’t see any of this. I am able to get 60 fps with fast haptic interaction just like in the video. I use a dell workstation with intel xeon dual core 3Ghz and a 128 mb nvidia quadro fx graphics card. If u are using a laptop, please check the DPC latency. I am stepping the physics at a very high rate inside the haptics loop and if the haptics servo rate on your system is not very good, then you will gear the clicking noise. This means that your system is not able to handle such a high speed thread. Try the demo on a desktop or workstation and see if u can find a difference.

  2. XMight says:

    I’m trying currently to apply the torque on the rigid bodies based on the pitch, roll and yaw of the Phantom arm, but I don’t manage to do this. I looked in your code, but I didn’t understand what formula you used to achieve this, can you give me a hint how you did the rotation? In the case of the simple movement I used Hooke’s law and damping effect, and it works very well, even if I saw in your code something with proxyMass. The same thing is with the torque, what is this. In the case of the rotation, I simply multiply the rigidBody rotation with the proxy rotation, but this causes the body constantly speed up the rotation, even if the arm is still. Thank you!

    • somapanam says:

      Andrei, I am using just a simple spring mass damper system : a linear spring to control the X / Y/ Z position and a torsion spring to control roll / pitch / yaw of the body.

      It is a basic spring mass damper system.

      B = DAMPING_RATIO * 2* Sqrt(M*K)

      M = Mass of the spring system K = Stiffness of the spring B = damping co-efficient.

      In the following equation float Byaw= 0.05*sqrt(torqueProxymass*K_torque[0]);

      Byaw = damping co-efficient. torqueProxymass = mass K_torque = spring stiffness

      DAMPING_RATIO is adjusted according to the simulation speed and stability.

      DAMPING_RATIO = 1 in following equations means system is critically damped.

      float Bx=2*sqrt(proxymass*K_force[0]); float By=2*sqrt(proxymass*K_force[1]); float Bz=2*sqrt(proxymass*K_force[2]);

      DAMPING_RATIO = 0.05 in following equations means system is under damped.

      float Byaw= 0.05*sqrt(torqueProxymass*K_torque[0]); float Bpitch= 0.05*sqrt(torqueProxymass*K_torque[1]); float Broll= 0.05*sqrt(torqueProxymass*K_torque[2]);

      Please checkout the following wiki for more detailed info. http://en.wikipedia.org/wiki/Damping

      The important thing to remember is to adjust the mass of your object based on how big it is (volume).

      Hope this helps.


  3. XMight says:

    Well, as I mentioned in my previous post, I implemented the same thing for the movement of the rigidBody, but in another way. What I did is:

    Ftot = Fhook + Fdamp.
    Fhook = -kx; k = nominalMaximumStiffness, returned by HL. x = rigidBodyPosition – proxyPosition.

    Fdamp = -cv. c = zeta*2*objMass*sqrt(k/objMass); v = linearVelocity of the body.
    zeta = 0.2 (I defined it like that, because otherwise the movement of the body with the arm is very slow, so underdamped).

    As I mentioned also, this works very well for movement, but not for the rotation (No rotation at all, in any direction, or rotation only in one direction, and constant increasing speed)

    Maybe I did something wrong, anyway, I will verify my code again, and I’ll compare it with yours. Thank you for the explanation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s