collision detection problem of collision shape controlled by haptic device

Post Reply
zaqwer
Posts: 2
Joined: Sat Dec 09, 2017 3:38 pm

collision detection problem of collision shape controlled by haptic device

Post by zaqwer »

Hi everyone,

I have a question about the collision detection between a softbody and a rigid body.

Here is what I'm trying to do. The bottom of the softbody is attached to the ground, so it cannot be moved but can be still deformed. The rigid body is controlled by a haptic device, so the user can move it anywhere. The rigid body is a L shape handle that is simplified with two implicit collision shapes--capsule. If the user touches the softbody with a slow motion and gentle force, the collision detection works regularly. However, when the user uses a brutal force and pushes hard against the softbody, it will totally penetrate into the softbody.

So, my question is, is there any collision detection and resolution for collision shape? It seems not to me, when the collision shape pushes the softbody, there is collision detection and resolution for the softbody, so the softbody knows when the collision happened and how to respond after. However, it seems no collision resolution for the collision shape, when the user pushes against the softbody to it's maximum deformation, somehow, there should have a way to adjust the transformation of the collision shape from keeping moving forward and penetrating into the softbody.

Can bullet solve this problem or am I wrong? I found the samething in Nvidia Flex. Also, in all the related papers, most of the papers are talking about collision detections between virtual objects. There are hardly any paper talking about the collision detection and resolution for a rigid collision shape controlled by a haptic device. Hope someone can help me understand this problem.

Also I have some general questions about Bullet?
1. Does bullet physics use force-based dynamics or position-based dynamics? If it's position-based, I didn't see any particles. In Nvidia Flex simulator, you can visualize all the particles on a softbody or rigid body. Also, are the particles the vertices of the object mesh? In Nvidia, all the particles are sampled all over the body volume, not just on the surface.

2. How to change the camera view in Bullet? Currently, I only know how to zoom in/out by scrolling the mouse wheel. Is there a way to look up/down/left/right? Or change camera position?

Thanks!
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: collision detection problem of collision shape controlled by haptic device

Post by Erwin Coumans »

Have you played with all the SoftBody demos in the Bullet ExampleBrowser? Various demos show rigid bodies resting on soft bodies, with two-way interaction.

btRigidBody uses impulse-based (velocity-level) dynamics
btSoftBody uses position based dynamics.
There is two-way interaction between btSoftBody and btRigidBody/btMultiBody.

Hold the SHIFT/CTRL and/or ALT keys, in combination with the mouse buttons/drag to move the camera.
zaqwer
Posts: 2
Joined: Sat Dec 09, 2017 3:38 pm

Re: collision detection problem of collision shape controlled by haptic device

Post by zaqwer »

Hi Erwin, thanks for your reply. I really appreciate it.

Yes, I have tried all the Softbody demos. Like what you said, there are two-way interaction between softbody and rigidbody. However, the collision detection only works robustly when the rigidbody moves by itself and interacts with the softbody. When I use mouse-pick to pick up one rigidbody and drag it through the cloth with brute force or drag it fast, it will penetrate the cloth eventually. But I haven't tried to control the rigidbody with haptic device yet, I think the same thing would happen. With haptic device controlling the rigidbody, it won't allow the rigidbody to react freely. If you push the rigidbody against the softbody hard, it will go through the softbody.

My goal is to build a neonatal intubation simulator based on Bullet. We want to simulate the baby head as a softbody and the laryngoscope as a simplified collision shape. The reason that we are so strict with soft-rigid collision detection and response is because when you insert the laryngoscope into the baby's mouth, you need to apply strong force on the tongue in order to find a good angle to see the tracheal. In this case, I'm worried that the laryngoscope would penetrate the tongue or even the jaw and finally get out of the head. I want to know if there is a way to prevent the rigidbody from going through the softbody. When the rigidbody reaches the maximum deformation of the softbody, is there a way to stop the rigidbody from moving forward into the softbody, but you would still be able to rotate or slide against the surface of the softbody.
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: collision detection problem of collision shape controlled by haptic device

Post by drleviathan »

A RigidBody will bounce off of a SoftBody, but the question is: what are you using to position the RigidBody onto the surface of the SoftBody? If you're using a constraint to position it then of course: the constraint is stiff and will defeat any rebound effect from the SoftBody.

Perhaps you want to use a custom Action to push the RigidBody around so you can modulate how "hard" it tries to move? I posted some example code for how to do this in this thread.
Post Reply