Applying a force at the point of collision

Post Reply
karnivaurus
Posts: 9
Joined: Thu Nov 19, 2015 2:18 pm

Applying a force at the point of collision

Post by karnivaurus »

Suppose I want to simulate some kind of gripper with two "fingers" (such as pair of pliers, or two-fingered robot hand), picking up an object from the ground. Both the gripper and the object are dynamic rigid bodies.

I want to start with the object roughly in the centre of the gripper, and then move the two fingers towards the object, to determine the point at which they make contact with the object's surface. Then, I want to apply a certain force from the fingers onto the object, before finally lifting the fingers (and hence the object) upwards.

Is there any simple way to achieve this just by treating the two fingers as two individual rigid bodies? I want to just move the fingers towards the object to find the point of collision -- so can I treat them as static objects (so they don't fall under gravity, which is what I want), and move them manually by slowly changing the pose of each finger over time? How will I know at what point the fingers and object collide, so that I should stop moving the fingers and start applying a force?

Thank you!
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Applying a force at the point of collision

Post by benelot »

You can detect collisions using one of the collision callbacks in Bullet. If can detect the colliding objects and then apply the force at whatever point on the rigidbody you want.

Check the following for more information:
http://www.bulletphysics.org/mediawiki- ... d_Triggers

But I am not sure why you intend to take your physics apart that way. Why don't you want the gripper to be affected by gravity, why do you want to apply the force to the gripped object yourself? That can all be done by the physics engine I believe. Are you missing something in particular that makes you want to implement it by yourself?
Post Reply