Local & Global Respondable masks

Typically: "How do I... ", "How can I... " questions
Post Reply
major_david
Posts: 14
Joined: 16 Jun 2023, 18:44

Local & Global Respondable masks

Post by major_david »

Hey everyone,

I hope you're doing well. I'm currently working on modeling my gripper in Coppelia, and I've run into a bit of a puzzle regarding the object's respondable feature, specifically in the Rigid Body Dynamics Properties.

After turning on the respondable option, I noticed these 16 boxes named local and global in the Rigid Body Dynamics Properties (check out the picture attached). The thing is, I couldn't find any info about what each of these boxes does in the documentation. Any chance someone could break down what each of these boxes is for?

In my project, I really need to detect collisions between different parts of the gripper and external objects. I'm using the sim.checkCollision function, but here's the kicker - even when both the gripper and the objects are set as respondable, the function keeps returning false when there's a collision. I thought tweaking the internal masks might help, but enabling all the boxes in the local masks section makes the gripper go haywire.

So, anyone got any ideas on how to fix this? Also, can someone shed some light on what each of those boxes in the local and global masks does exactly?

Thanks a bunch!
Image

major_david
Posts: 14
Joined: 16 Jun 2023, 18:44

Re: Local & Global Respondable masks

Post by major_david »

Sorry for the image link

here is the updated link:
https://drive.google.com/file/d/1k8g2Ej ... drive_link

coppelia
Site Admin
Posts: 10381
Joined: 14 Dec 2012, 00:25

Re: Local & Global Respondable masks

Post by coppelia »

Hello,

I think you are mixing up collidable and respondable:

When an object is collidable, then you will be able to use it for collision detection. You can do collision detection with objects that are not dynamically enabled, nor respondable.

When an object is respondable, then it will react to collision (or another respondable shape will react). This is a property of the underlying physics engines. If two objects shape a common ancestor, then if their respective local respondable masks overlap, then there will be collision response. If they do not share a common ancestor, then if their respective global respondable masks overlap, then there will be collision response.

Now, if there is a collision response, it could well be that the sim.checkCollision will never detect any collision. This is because the physics engine could already react to a collision before there is an effective collision.

If you need to perfrom collision detection with some distance threashold, you could use minimum distance calculation (slower), or you could extract an inflated convex hull ([Menu bar > Add > Inflated convex hull...]) and perform collision detection with that hull (which could be hidden).

Cheers

major_david
Posts: 14
Joined: 16 Jun 2023, 18:44

Re: Local & Global Respondable masks

Post by major_david »

coppelia wrote: 22 Nov 2023, 10:07 When an object is respondable, then it will react to collision (or another respondable shape will react). This is a property of the underlying physics engines. If two objects shape a common ancestor, then if their respective local respondable masks overlap, then there will be collision response. If they do not share a common ancestor, then if their respective global respondable masks overlap, then there will be collision response.
Thanks for the explanation, To clarify, for a complex part like a gripper with numerous shapes and objects, I can uncheck all the local respondable masks. This is because I don't want any collision response within the internal components. Conversely, I should activate all the global respondable masks to enable reactions to external objects.

And about your solution to detect a collision, Can I create a convex hull from the gripper and then detect a collision by using sim.checkCollision function and passing the object and convex hull handles as arguments?

Post Reply