mani_skill.utils.geometry#

Submodules#

Functions#

Package Contents#

mani_skill.utils.geometry.aabc(points)[source]#

Compute axis-aligned bounding cylinder for 3D points.

Parameters:

points (numpy.ndarray) – Nx3 array of points

Returns:

(center_x, center_y, radius, min_z, max_z) tuple

Return type:

Tuple[float, float, float, float, float]

mani_skill.utils.geometry.angle_between_vec(a, b)[source]#
mani_skill.utils.geometry.angle_distance(q0, q1)[source]#
Parameters:
  • q0 (sapien.Pose) –

  • q1 (sapien.Pose) –

mani_skill.utils.geometry.get_axis_aligned_bbox_for_actor(actor)[source]#
Parameters:

actor (sapien.Entity) –

mani_skill.utils.geometry.get_axis_aligned_bbox_for_articulation(art)[source]#
Parameters:

art (sapien.physx.PhysxArticulation) –

mani_skill.utils.geometry.get_local_aabc_for_actor(actor)[source]#
Parameters:

actor (sapien.Entity) –

Parameters:

link (sapien.physx.PhysxArticulationLinkComponent) –

mani_skill.utils.geometry.get_oriented_bounding_box_for_2d_points(points_2d, resolution=0.0)[source]#
Parameters:

points_2d (numpy.ndarray) –

Return type:

dict

mani_skill.utils.geometry.invert_transform(H)[source]#
Parameters:

H (numpy.ndarray) –

mani_skill.utils.geometry.rotate_2d_vec_by_angle(vec, theta)[source]#
mani_skill.utils.geometry.rotate_vector(v, q)[source]#
mani_skill.utils.geometry.rotation_between_vec(a, b)[source]#
mani_skill.utils.geometry.sample_on_unit_circle(rng)[source]#
mani_skill.utils.geometry.sample_on_unit_sphere(rng)[source]#

Algo from http://corysimon.github.io/articles/uniformdistn-on-sphere/

mani_skill.utils.geometry.transform_points(H, pts)[source]#

transforms a batch of pts by a batch of transformation matrices H

Parameters:
  • H (torch.Tensor) –

  • pts (torch.Tensor) –

Return type:

torch.Tensor

mani_skill.utils.geometry.wxyz_to_xyzw(q)[source]#
mani_skill.utils.geometry.xyzw_to_wxyz(q)[source]#