concepts.simulator.pybullet.manipulation_utils.contact_samplers.mesh_line_intersect#

mesh_line_intersect(t_mesh, ray_origin, ray_direction)[source]#

Intersects a ray with a mesh.

Parameters:
  • t_mesh (TriangleMesh) – the mesh to intersect with.

  • ray_origin (ndarray) – the origin of the ray.

  • ray_direction (ndarray) – the direction of the ray.

Returns:

A tuple of (point, normal) if an intersection is found, None otherwise.

Return type:

Tuple[ndarray, ndarray] | None