I’m currently working on a project simulating an aseptic filling machine, but I’ve run into a frustrating issue regarding the setup of the gripper and the filler, and I would really appreciate some help.
The Problem:
-
The two objects (the bottle/gripper and the filler) simply won’t get close enough to each other.
-
Instead of a smooth interaction, they either get stuck or start jittering/vibrating noticeably when they get too close.
https://youtu.be/cYZ2mtgblw8?si=EYCmr3LB_oHu_NCD
What I’ve tried so far:
-
I have already adjusted both the Rest Offset and Contact Offset settings for the bottle, the gripper, and the filler. Unfortunately, this didn’t resolve the issue at all.
Hi Mate,
It looks like you’re just using the wrong collider type for the gripper.
You can take a look at how we set this up here: Aseptic Bottle Filler Simulation
The Gripper entity has its collider type set to “None”. And we add physics to its children, attaching the colliders of the children to the parent.
Here, you can see that the child has a physics component, with the body set to “Attached” and the collider set to “Custom”.
This is important, because the collision geometry is concave. So we can’t use a box or convex collider for these parts. You can see the collision geometry if you enable physics visualization, using the button in the infobar at the bottom.
If you set the Gripper entity to use a Convex collider, you can see that the collision geometry effectively shrink wraps the various children. This is why the gripper isn’t able to move forwards fully. The colliders are colliding with the bottles. And since the force on the motor is 1000N, they collide with quite extreme force.
All you should need to do is set the collider property on the Gripper’s physics component to “None”. Then add physics to each child, setting all their body properties to “Attached”, and setting all their collider properties to “Custom”. When you set the collider property to custom, it will open the Custom Collider Tool. You can leave all the properties as default and just hit the Generate button.
This should produce a sufficiently accurate collision shape. Then just hit the Save button in the toolbar and it will transfer the collider back into ProtoTwin. You’ll need to repeat this for each child.
I’d recommend leaving the rest offset and contact offsets as the default values (0 for rest offset and -1 for contact offset). It’s extremely rare that you should need to change these.
You can see the collider documentation page for further information about colliders.
Let me know if you run into any issues or if anything is unclear.