Skip to main content
Ctrl+K
Genesis 0.3.3 documentation - Home Genesis 0.3.3 documentation - Home
  • User Guide
  • API Reference
  • Roadmap
  • User Guide
  • API Reference
  • Roadmap

Section Navigation

  • Scene
    • Scene
    • Simulator
    • Coupler
  • Entity
    • RigidEntity
      • RigidEntity
      • RigidLink
      • RigidJoint
      • RigidGeom
      • RigidVisGeom
    • AvatarEntity
      • AvatarEntity
      • AvatarLink
      • AvatarJoint
      • AvatarGeom
    • MPMEntity
    • FEMEntity
    • PBDEntity
      • PBDParticleEntity
      • PBDFreeParticleEntity
      • PBD2DEntity
      • PBD3DEntity
      • PBDTetEntity
    • SPHEntity
    • DroneEntity
    • HybridEntity
    • Emitter
  • Material
    • gs.materials.Rigid
    • gs.materials.Avatar
    • MPM
      • gs.materials.MPM.Elastic
      • gs.materials.MPM.ElastoPlastic
      • gs.materials.MPM.Liquid
      • gs.materials.MPM.Muscle
      • gs.materials.MPM.Sand
      • gs.materials.MPM.Snow
    • FEM
      • gs.materials.FEM.Elastic
      • gs.materials.FEM.Muscle
    • PBD
      • gs.materials.PBD.Elastic
      • gs.materials.PBD.Cloth
      • gs.materials.PBD.Liquid
      • gs.materials.PBD.Particle
    • SPH
      • gs.materials.SPH.Liquid
    • gs.materials.Hybrid
  • Sensor
    • Camera
  • Options
    • gs.options.Options
    • Simulator, Coupler & Solver Options
      • gs.options.SimOptions
      • gs.options.CouplerOptions
      • gs.options.ToolOptions
      • gs.options.RigidOptions
      • gs.options.AvatarOptions
      • gs.options.MPMOptions
      • gs.options.SPHOptions
      • gs.options.PBDOptions
      • gs.options.FEMOptions
      • gs.options.SFOptions
    • Morph
      • gs.morphs.Morph
      • Primitive
        • gs.morphs.Primitive
        • gs.morphs.Box
        • gs.morphs.Sphere
        • gs.morphs.Cylinder
        • gs.morphs.Plane
      • FileMorph
        • gs.morphs.FileMorph
        • gs.morphs.Mesh
        • gs.morphs.URDF
        • gs.morphs.MJCF
        • gs.morphs.Terrain
        • gs.morphs.Drone
    • Renderer
      • gs.renderers.Renderer
      • gs.renderers.Rasterizer
      • gs.renderers.RayTracer
      • gs.renderers.RayTracer
    • Surface
      • gs.surfaces.Surface
      • Plastic
        • gs.surfaces.Plastic
        • gs.surfaces.Rough
        • gs.surfaces.Smooth
        • gs.surfaces.Reflective
        • gs.surfaces.Collision
        • gs.surfaces.Default
      • Metal
        • gs.surfaces.Metal
        • gs.surfaces.Iron
        • gs.surfaces.Aluminium
        • gs.surfaces.Copper
        • gs.surfaces.Gold
      • Emission
        • gs.surfaces.Emission
      • Glass
        • gs.surfaces.Glass
        • gs.surfaces.Water
    • Texture
      • gs.textures.Texture
      • gs.textures.ColorTexture
      • gs.textures.ImageTexture
    • Viewer & Visualization
      • gs.options.ViewerOptions
      • gs.options.VisOptions
  • API Reference
  • Entity
  • RigidEntity
  • RigidLink

RigidLink#

class genesis.engine.entities.rigid_entity.rigid_link.RigidLink(entity: RigidEntity, name: str, idx: int, joint_start: int, n_joints: int, geom_start: int, cell_start: int, vert_start: int, face_start: int, edge_start: int, verts_state_start: int, vgeom_start: int, vvert_start: int, vface_start: int, pos: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], quat: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], inertial_pos: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None, inertial_quat: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None, inertial_i: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None, inertial_mass: float | None, parent_idx: int, root_idx: int | None, invweight: float | None, visualize_contact: bool)[source]#

Bases: RBC

RigidLink class. One RigidEntity consists of multiple RigidLinks, each of which is a rigid body and could consist of multiple RigidGeoms (link.geoms, for collision) and RigidVisGeoms (link.vgeoms for visualization).

get_pos(envs_idx=None)[source]#

Get the position of the link in the world frame.

Parameters:

envs_idx (int or array of int, optional) – The indices of the environments to get the position. If None, get the position of all environments. Default is None.

get_quat(envs_idx=None)[source]#

Get the quaternion of the link in the world frame.

Parameters:

envs_idx (int or array of int, optional) – The indices of the environments to get the quaternion. If None, get the quaternion of all environments. Default is None.

get_vel(envs_idx=None) → Tensor[source]#

Get the linear velocity of the link in the world frame.

Parameters:

envs_idx (int or array of int, optional) – The indices of the environments to get the linear velocity. If None, get the linear velocity of all environments. Default is None.

get_ang(envs_idx=None) → Tensor[source]#

Get the angular velocity of the link in the world frame.

Parameters:

envs_idx (int or array of int, optional) – The indices of the environments to get the angular velocity. If None, get the angular velocity of all environments. Default is None.

get_verts()[source]#

Get the vertices of the link’s collision body (concatenation of all link.geoms) in the world frame.

get_vverts()[source]#

Get the vertices of the link’s visualization body (concatenation of all link.vgeoms) in the world frame.

get_AABB()[source]#

Get the axis-aligned bounding box (AABB) of the link’s collision body (concatenation of all link.geoms) in the world frame.

get_vAABB()[source]#

Get the axis-aligned bounding box (AABB) of the link’s visual body (concatenation of all link.vgeoms) in the world frame.

set_mass(mass)[source]#

Set the mass of the link.

get_mass()[source]#

Get the mass of the link.

set_friction(friction)[source]#

Set the friction of all the link’s geoms.

property uid#

The unique ID of the link.

property name: str#

The name of the link.

property entity: RigidEntity#

The entity that the link belongs to.

property solver: RigidSolver#

The solver that the link belongs to.

property visualize_contact: bool#

Whether to visualize the contact of the link.

property joints: list['Joint']#

The sequence of joints that connects the link to its parent link.

property n_joints#

Number of the joints that connects the link to its parent link.

property joint_start#

The start index of the link’s joints in the RigidSolver.

property joint_end#

The end index of the link’s joints in the RigidSolver.

property n_dofs#

The number of degrees of freedom (DOFs) of the entity.

property dof_start#

The index of the link’s first degree of freedom (DOF) in the scene.

property dof_end#

The index of the link’s last degree of freedom (DOF) in the scene plus one.

property n_qs#

Returns the number of q variables of the link.

property q_start#

Returns the starting index of the q variables of the link in the rigid solver.

property q_end#

Returns the last index of the q variables of the link in the rigid solver plus one.

property idx#

The global index of the link in the RigidSolver.

property parent_idx#

The global index of the link’s parent link in the RigidSolver. If the link is the root link, return -1.

property root_idx#

The global index of the link’s root link in the RigidSolver.

property child_idxs#

The global indices of the link’s child links in the RigidSolver.

property idx_local#

The local index of the link in the entity.

property parent_idx_local#

The local index of the link’s parent link in the entity. If the link is the root link, return -1.

property child_idxs_local#

The local indices of the link’s child links in the entity.

property is_leaf#

Whether the link is a leaf link (i.e., has no child links).

property invweight#

The invweight of the link.

property pos: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]#

The initial position of the link. For real-time position, use link.get_pos().

property quat: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]#

The initial quaternion of the link. For real-time quaternion, use link.get_quat().

property inertial_pos: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None#

The initial position of the link’s inertial frame.

property inertial_quat: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None#

The initial quaternion of the link’s inertial frame.

property inertial_mass: float | None#

The initial mass of the link.

property inertial_i: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None#

The inerial matrix of the link.

property geoms: list[genesis.engine.entities.rigid_entity.rigid_geom.RigidGeom]#

The list of the link’s collision geometries (RigidGeom).

property vgeoms: list[genesis.engine.entities.rigid_entity.rigid_geom.RigidVisGeom]#

The list of the link’s visualization geometries (RigidVisGeom).

property n_geoms: int#

Number of the link’s collision geometries.

property geom_start: int#

The start index of the link’s collision geometries in the RigidSolver.

property geom_end: int#

The end index of the link’s collision geometries in the RigidSolver.

property n_vgeoms: int#

Number of the link’s visualization geometries (vgeom).

property vgeom_start: int#

The start index of the link’s vgeom in the RigidSolver.

property vgeom_end: int#

The end index of the link’s vgeom in the RigidSolver.

property n_cells#

Number of sdf cells of all the link’s geoms.

property n_verts: int#

Number of vertices of all the link’s geoms.

property n_vverts: int#

Number of vertices of all the link’s vgeoms.

property n_faces: int#

Number of faces of all the link’s geoms.

property n_vfaces: int#

Number of faces of all the link’s vgeoms.

property n_edges: int#

Number of edges of all the link’s geoms.

property is_built: bool#

Whether the entity the link belongs to is built.

property is_free#

Whether the entity the link belongs to is free.

property pose: Pose#

Return the current pose of the link (note, this is not necessarily the same as the principal axes frame).

previous

RigidEntity

next

RigidJoint

On this page
  • RigidLink
    • RigidLink.get_pos()
    • RigidLink.get_quat()
    • RigidLink.get_vel()
    • RigidLink.get_ang()
    • RigidLink.get_verts()
    • RigidLink.get_vverts()
    • RigidLink.get_AABB()
    • RigidLink.get_vAABB()
    • RigidLink.set_mass()
    • RigidLink.get_mass()
    • RigidLink.set_friction()
    • RigidLink.uid
    • RigidLink.name
    • RigidLink.entity
    • RigidLink.solver
    • RigidLink.visualize_contact
    • RigidLink.joints
    • RigidLink.n_joints
    • RigidLink.joint_start
    • RigidLink.joint_end
    • RigidLink.n_dofs
    • RigidLink.dof_start
    • RigidLink.dof_end
    • RigidLink.n_qs
    • RigidLink.q_start
    • RigidLink.q_end
    • RigidLink.idx
    • RigidLink.parent_idx
    • RigidLink.root_idx
    • RigidLink.child_idxs
    • RigidLink.idx_local
    • RigidLink.parent_idx_local
    • RigidLink.child_idxs_local
    • RigidLink.is_leaf
    • RigidLink.invweight
    • RigidLink.pos
    • RigidLink.quat
    • RigidLink.inertial_pos
    • RigidLink.inertial_quat
    • RigidLink.inertial_mass
    • RigidLink.inertial_i
    • RigidLink.geoms
    • RigidLink.vgeoms
    • RigidLink.n_geoms
    • RigidLink.geom_start
    • RigidLink.geom_end
    • RigidLink.n_vgeoms
    • RigidLink.vgeom_start
    • RigidLink.vgeom_end
    • RigidLink.n_cells
    • RigidLink.n_verts
    • RigidLink.n_vverts
    • RigidLink.n_faces
    • RigidLink.n_vfaces
    • RigidLink.n_edges
    • RigidLink.is_built
    • RigidLink.is_free
    • RigidLink.pose
Edit on GitHub

This Page

  • Show Source

© Copyright 2024, Genesis Developers.

Created using Sphinx 6.2.1.

Built with the PyData Sphinx Theme 0.16.1.