distance3d.hydroelastic_contact.RigidBody¶
- class distance3d.hydroelastic_contact.RigidBody(body2origin, vertices, tetrahedra, potentials, youngs_modulus=1.0)[source]¶
Rigid body represented by tetrahedral mesh.
- Parameters:
- body2originarray, shape (4, 4)
Pose of the mesh.
- verticesarray, shape (n_vertices, 3)
Vertices of the mesh.
- tetrahedraarray, shape (n_tetrahedra, 4)
Indices of vertices that form tetrahedra of the mesh.
- potentialsarray, shape (n_vertices,)
Potential of each vertex. Shortest distance to surface.
- youngs_modulusfloat, optional (default: 1.0)
The stiffness of the material the rigidbody is made out of.
- Attributes:
aabb_treeThe aabb_tree for broad phase collision detection
aabbsThe aabbs for broad phase collision detection
artist_The artist to visualize the rigid body as a wireframe.
comCenter of mass.
tetrahedra_pointsAll points of all tetrahedra in body frame.
tetrahedra_potentialsPotentials of tetrahedra.
youngs_modulusGet the young’s modulus of the Object.
Methods
aabb()The aabb of the rigidbody
express_in(new_body2origin)Express tetrahedral meshes in another frame.
make_artist([c])Creates a new artist.
make_box(box2origin, size)Create box.
make_capsule(capsule2origin, radius, height)Create capsule.
make_cube(cube2origin, size)Create cube.
make_cylinder(cylinder2origin, radius, length)Create cylinder.
make_ellipsoid(ellipsoid2origin, radii[, order])Create ellipsoid.
make_sphere(center, radius[, order])Create sphere.
update_pose(body2origin)Set new pose.
Methods
__init__(body2origin, vertices, tetrahedra, ...)aabb()The aabb of the rigidbody
express_in(new_body2origin)Express tetrahedral meshes in another frame.
make_artist([c])Creates a new artist.
make_box(box2origin, size)Create box.
make_capsule(capsule2origin, radius, height)Create capsule.
make_cube(cube2origin, size)Create cube.
make_cylinder(cylinder2origin, radius, length)Create cylinder.
make_ellipsoid(ellipsoid2origin, radii[, order])Create ellipsoid.
make_sphere(center, radius[, order])Create sphere.
update_pose(body2origin)Set new pose.
Attributes
aabb_treeThe aabb_tree for broad phase collision detection
aabbsThe aabbs for broad phase collision detection
artist_The artist to visualize the rigid body as a wireframe.
comCenter of mass.
tetrahedra_pointsAll points of all tetrahedra in body frame.
tetrahedra_potentialsPotentials of tetrahedra.
youngs_modulusGet the young's modulus of the Object.