Page 1 of 1

Inaccurate RayTest in Pybullet

Posted: Tue Dec 10, 2019 11:10 am
by adamsyammaszaki
Hello, I am new to pybullet. So, I am planning to perform several raytest on an object. For the sake of clarity, I would like you to see the image below.

Image
(if you cannot see the image, pls click the link as follow, https://imgur.com/k3qRtj0)

The purple lines are the visualization of the rays, I would like to know which ray hits the object. And the ray that hits the object is visualized as a white line. As you can see, the ray with white line is the ray that does not intersect with the object. Is there any accuracy problem with raytest in pybullet? Or does it have something to do with my laptop that does not have gpu?
Thank you for your help.

Re: Inaccurate RayTest in Pybullet

Posted: Thu Dec 12, 2019 7:05 am
by adamsyammaszaki
Is it because the collision shape is convex hull? If that's the case then, it explains why I got such results.

Re: Inaccurate RayTest in Pybullet

Posted: Fri Dec 20, 2019 12:08 am
by Erwin Coumans
Yes, by default we use convex hulls. Best to create a convex decomposition for moving objects (using VHACD, there are utils from obj -> vhacd).
See this example:
https://github.com/bulletphysics/bullet ... vhacd.urdf


For concave static trangle meshes, you can mark them as 'concave'.
See samurai.urdf for an example https://github.com/bulletphysics/bullet ... ai.urdf#L3