distance3d.broad_phase.BoundingVolumeHierarchy

class distance3d.broad_phase.BoundingVolumeHierarchy(tm, base_frame, base_frame2origin=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]))[source]

Bounding volume hierarchy (BVH) for broad phase collision detection.

Wraps multiple colliders that are connected through transformations. In addition, these colliders are stored in an AABB tree for broad phase collision detection.

Parameters:
tmpytransform3d.transform_manager.TransformManager

Transform manager that stores the transformations.

base_framestr

Name of the base frame in which colliders are represented.

base_frame2originarray, shape (4, 4), optional (default: np.eye(4))

The position of the base_frame to origin.

Attributes:
aabbtree_AabbTree

Tree of axis-aligned bounding boxes.

colliders_dict

Maps frames of collision objects to colliders.

self_collision_whitelists_dict

Whitelists for self-collision detection in case this BVH represents a robot.

Methods

aabb_overlapping_colliders(collider[, whitelist])

Get colliders with an overlapping AABB.

aabb_overlapping_with_other_bvh(other_bvh)

Get colliders with an overlapping AABB.

aabb_overlapping_with_self()

Get colliders with overlapping with itself.

add_collider(frame, collider)

Add collider.

fill_tree_with_colliders(tm[, make_artists, ...])

Fill tree with colliders from URDF transform manager.

get_artists()

Get all artists.

get_collider_frames()

Get collider frames.

get_colliders()

Get all colliders.

update_collider_poses()

Update poses of all colliders from transform manager.

__init__(tm, base_frame, base_frame2origin=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]))[source]

Methods

__init__(tm, base_frame[, base_frame2origin])

aabb_overlapping_colliders(collider[, whitelist])

Get colliders with an overlapping AABB.

aabb_overlapping_with_other_bvh(other_bvh)

Get colliders with an overlapping AABB.

aabb_overlapping_with_self()

Get colliders with overlapping with itself.

add_collider(frame, collider)

Add collider.

fill_tree_with_colliders(tm[, make_artists, ...])

Fill tree with colliders from URDF transform manager.

get_artists()

Get all artists.

get_collider_frames()

Get collider frames.

get_colliders()

Get all colliders.

update_collider_poses()

Update poses of all colliders from transform manager.