Morph#
- class genesis.options.morphs.Morph(*, pos: tuple[float, float, float] = (0.0, 0.0, 0.0), euler: tuple[float, float, float] | None = None, quat: tuple[float, float, float, float] | None = None, offset_pos: tuple[float, float, float] = (0.0, 0.0, 0.0), offset_euler: tuple[float, float, float] | None = None, offset_quat: tuple[float, float, float, float] | None = None, visualization: bool = True, collision: bool = True, enable_custom_vverts: bool = False) None[source]#
This is the base class for all genesis morphs. A morph in genesis is a hybrid concept, encapsulating both the geometry and pose information of an entity. This includes shape primitives, meshes, URDF, MJCF, Terrain, and soft robot description files.
Note
This class should not be instantiated directly.
- Parameters:
pos (tuple, shape (3,), optional) – The initial position of the entity in meters at creation time. Defaults to (0.0, 0.0, 0.0).
euler (tuple, shape (3,), optional) – The initial euler angle of the entity in degrees at creation time. This follows scipy’s extrinsic x-y-z rotation convention. Defaults to (0.0, 0.0, 0.0).
quat (tuple, shape (4,), optional) – The initial quaternion (w-x-y-z convention) of the entity at creation time. If specified,
eulerwill be ignored. Defaults to None.offset_pos (tuple, shape (3,), optional) – A fixed pose offset applied in the entity’s own body frame on top of the
pos/euler(orpos/quat) pose. It shifts the world pose used internally by the solver but is stripped back out by the relative getters, soget_pos/get_quat(which are relative by default) still reportpos/quat. The morph pose and the offset compound exactly like a parent and a child frame: the world pose istransform_pos_quat_by_trans_quat(offset_pos, offset_quat, pos, quat), i.e. the offset is expressed in the body frame defined bypos/quat. Sooffset_posrotates together with the orientation rather than being a world-frame shift, and when the orientation is identity it simply adds topos. Defaults to (0.0, 0.0, 0.0).offset_euler (tuple, shape (3,), optional) – The orientation offset
offset_quatgiven as an euler angle in degrees (scipy extrinsic x-y-z convention). Mutually exclusive withoffset_quat. Defaults to None.offset_quat (tuple, shape (4,), optional) – A fixed orientation offset (w-x-y-z convention); see
offset_posfor how it compounds withpos/quatto form the world pose. Up-axis conversions (e.g. loading a Z-up asset) are stored here. Mutually exclusive withoffset_euler. Defaults to None.visualization (bool, optional) – Whether the entity needs to be visualized. Set it to False if you need a invisible object only for collision purposes. Defaults to True.
visualizationandcollisioncannot both be False. This is only used for RigidEntity.collision (bool, optional) – Whether the entity needs to be considered for collision checking. Defaults to True.
visualizationandcollisioncannot both be False. This is only used for RigidEntity.requires_jac_and_IK (bool, optional) – This parameter is deprecated.
is_free (bool, optional) – This parameter is deprecated.