fcl icon indicating copy to clipboard operation
fcl copied to clipboard

Raycasting?

Open dendicott-jpl opened this issue 7 years ago • 7 comments
trafficstars

Is there any recommended way to go about checking for collision along a line? I'm implementing FCL as an alternative to bullet and need to provide the same functionality. I'm considering using a very long and thin cylinder, but wanted to check before using a hacky solution.

dendicott-jpl avatar Jul 05 '18 21:07 dendicott-jpl

We need FCL raycasting at TRI also!

sherm1 avatar Jul 05 '18 22:07 sherm1

It looks like there is a feature flag for this, but it doesn't look like it does anything? https://github.com/j-rivero/fcl0.5/blob/master/src/continuous_collision.cpp#L279.

Perhaps someone here knows of a test case we could look at for implementing ray casting on top of FCL's BVH datastructures?

the13fools avatar Jun 10 '20 20:06 the13fools

I'm considering using a very long and thin cylinder, but wanted to check before using a hacky solution.

Better use a capsule than a cylinder. It's faster and behaves better numerically.

jmirabel avatar Jun 10 '20 20:06 jmirabel

I see, thank you for the quick reply!

Would the preferred way be to set a very long capsule and then sort the resulting collision points along the ray, or to ray march the length of the capsule?

I suppose that you could also use continuous collision detection to shoot a sphere along a ray, but I guess this is probably slower?

the13fools avatar Jun 10 '20 23:06 the13fools

If you only need the first collision, then a sphere of a very tiny radius and ccd is probably fine. I never used ccd from FCL (it does not support relative motions coming from robot kinematics) so I can't say about performances with the FCL implementation. However, I guess it is going to be a lot slower because you will have several BVH traversal.

The fastest is definitely to implement a special raycasting traversal. I don't think it is hard but, with FCL design, it's going to be verbose and spread into several classes.

jmirabel avatar Jun 11 '20 07:06 jmirabel

Still no solution?

caxapexac avatar Mar 11 '22 10:03 caxapexac

+1 Need raycasting

vincentdchan avatar Jan 18 '24 12:01 vincentdchan