Skip to main content
Ctrl+K
Genesis 0.3.14 documentation - Home Genesis 0.3.14 documentation - Home
  • 用户指南
  • API 参考
  • 路线图
  • 用户指南
  • API 参考
  • 路线图

Section Navigation

  • Scene
    • 场景 (Scene)
    • 仿真器 (Simulator)
  • Entity
    • RigidEntity(刚体实体)
      • RigidEntity(刚体实体)
      • RigidLink(刚体连杆)
      • RigidJoint(刚体关节)
      • RigidGeom(刚体几何体)
      • RigidVisGeom(刚体可视化几何体)
    • MPMEntity(材料点法实体)
    • FEMEntity(有限元法实体)
    • PBDEntity(基于位置的动力学实体)
      • PBDParticleEntity(PBD 粒子实体)
      • PBDFreeParticleEntity(PBD 自由粒子实体)
      • PBD2DEntity(PBD 2D 实体)
      • PBD3DEntity(PBD 3D 实体)
      • PBDTetEntity(PBD 四面体实体)
    • SPHEntity(光滑粒子流体动力学实体)
    • DroneEntity(无人机实体)
    • HybridEntity(混合实体)
    • Emitter(发射器)
  • 可视化与渲染
    • Visualizer
    • Viewer
    • 渲染器(Renderers)
      • Rasterizer
      • Raytracer
      • BatchRenderer
    • 相机(Cameras)
      • Camera
    • 灯光(Lights)
  • Sensors
    • 相机 (Camera)
    • 接触传感器
    • IMU 传感器
    • 射线投射传感器
  • 记录与回放
    • Recorder
    • RecorderManager
    • File Writers
    • Plotters
  • 物理引擎
    • Solvers (求解器)
      • RigidSolver
      • MPMSolver
      • FEMSolver
      • PBDSolver
      • SPHSolver
      • SFSolver
      • ToolSolver
    • Couplers
      • LegacyCoupler
      • SAPCoupler
      • IPCCoupler
    • States
  • Material
    • gs.materials.Rigid
    • 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
  • Options
    • gs.options.Options
    • 仿真器、耦合器与求解器选项
      • gs.options.SimOptions
      • gs.options.CouplerOptions
      • gs.options.ToolOptions
      • gs.options.RigidOptions
      • 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
    • 渲染器
      • gs.renderers.Renderer
      • gs.renderers.Rasterizer
      • gs.renderers.RayTracer
      • gs.renderers.RayTracer
    • 表面材质 (Surface)
      • gs.surfaces.Surface
      • 塑料
        • gs.surfaces.Plastic
        • gs.surfaces.Rough
        • gs.surfaces.Smooth
        • gs.surfaces.Reflective
        • gs.surfaces.Collision
        • gs.surfaces.Default
      • 金属
        • gs.surfaces.Metal
        • gs.surfaces.Iron
        • gs.surfaces.Aluminium
        • gs.surfaces.Copper
        • gs.surfaces.Gold
      • 自发光 (Emission)
        • gs.surfaces.Emission
      • 玻璃
        • gs.surfaces.Glass
        • gs.surfaces.Water
    • 纹理
      • gs.textures.Texture
      • gs.textures.ColorTexture
      • gs.textures.ImageTexture
    • 查看器与可视化
      • gs.options.ViewerOptions
      • gs.options.VisOptions
  • 工具与辅助函数
    • Constants & Enums
    • Device & Platform Utilities
    • Tensor Utilities
    • Geometry Utilities
    • File I/O Utilities
  • 可微分仿真
    • Tensor
    • 创建操作
  • API 参考
  • 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, free_verts_state_start: int, fixed_verts_state_start: int, vgeom_start: int, vvert_start: int, vface_start: int, pos: np.typing.ArrayLike, quat: np.typing.ArrayLike, inertial_pos: np.typing.ArrayLike | None, inertial_quat: np.typing.ArrayLike | None, inertial_i: np.typing.ArrayLike | 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_AABB()[source]#

Get the axis-aligned bounding box (AABB) of the link’s collision body in the world frame by aggregating all the collision geometries associated with this link (link.geoms).

get_vAABB(envs_idx=None)[source]#

Get the axis-aligned bounding box (AABB) of the link’s visual body in the world frame by aggregating all the visual geometries associated with this link (link.vgeoms).

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['RigidJoint']#

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 idx_local#

The local index of the link in the entity.

property is_fixed#

Whether the link is fixed wrt the world.

property invweight#

The invweight of the link.

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

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

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

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]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None#

The initial position of the link’s inertial frame.

property inertial_quat: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | 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]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | 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#

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_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.idx_local
    • RigidLink.is_fixed
    • 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
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.