Cylinder similar collision detetction

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Lars
Posts: 3
Joined: Mon Jan 11, 2016 10:31 am

Cylinder similar collision detetction

Post by Lars »

Hi everybody,

first of all thank you for your great work on the BEPU physic engine!

I am using BEPU together with Helix 3D toolkit to visualize industrial robots. Here you can see an example Video: https://www.youtube.com/watch?v=x2-fyyBAv20.
All models in the simulation are loaded from STL files. After the files are loaded BEPU ConvexHullShapes are used for collsion detection.

Code: Select all

List<BEPUutilities.Vector3> points = STLLoader(filename);
Vector3 computedCenter;
ConvexHullHelper.RemoveRedundantPoints(points);
var shape = new BEPUphysics.CollisionShapes.ConvexShapes.ConvexHullShape(points, out computedCenter);
For most of the models I want to use, this is working very good as you can see in the video.
But I also want to use models were the ConvexHullShape does not fit my needs. For example a model of a tooling which is similar to a half cylinder (in reality it is measured from the real tooling so it is just similar to a cylinder). In my simulation the robot should place elements inside and I just want to have a collision event when the robot touches the surface of the tooling. At the moment I get a collision event when the robot moves inside the cylinder (see picture 1 - red means collision). Of course it is obvious that a collision is detected because the ConvexHull of that object looks like the second picture:

Image

Image

Do you have any suggestions how I could handle objects like the cylinder tooling or a tooling which e.g. looks like a drawer where the robot should place parts inside.

Thank you very much for your suggestions,
Lars
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Cylinder similar collision detetction

Post by Norbo »

If it's immobile, a StaticMesh or InstancedMesh would do the job. If it's mobile, a MobileMeshShape would work, but they are expensive in terms of CPU performance.

A CompoundBodyShape of ConvexHullShapes may be faster in many cases. BEPUphysics doesn't have any built in convex decomposition algorithm, so the hulls would either need to be created manually or imported from e.g. a V-HACD implementation.
Lars
Posts: 3
Joined: Mon Jan 11, 2016 10:31 am

Re: Cylinder similar collision detetction

Post by Lars »

Hi Norbo,

only the robots are mobile the rest of the scene is immobile. I just tried the InstancedMesh and it is working perfect.

Thank you very much for your reply and thanks again for your great work on BEPU.
Post Reply