skrobot.planner.swept_sphere.compute_swept_sphere¶
- skrobot.planner.swept_sphere.compute_swept_sphere(collision_mesh, n_sphere=None, tol=0.1)[source]¶
Compute swept spheres approximating a mesh
- Parameters:
collision_mesh (trimesh.Trimesh) – mesh which swept spheres are computed for
n_sphere (int or None) – number of sphere to approximate the mesh. If it’s set to None, the number of sphere is automatically determined.
tol (float) – tolerance determins how much mesh jutting-out from the swept-spheres are accepted. Let max_jut be the maximum jut-distance. Then the setting tol enforces max_jut / radius < max_jut. If some integer is set to n_sphere, tol does not affects the result.
- Returns:
centers_original_space (numpy.ndarray[float](n_sphere, 3)) – center of the approximating spheres in the space where the mesh vertices are defined.
radius (float) – radius of approximating sphers.