RigidJoint#
- class genesis.engine.entities.rigid_entity.rigid_joint.RigidJoint(entity, idx, link_idx, q_start, dof_start, desc: RigidJointDescription)[source]#
Bases:
RBCJoint class for rigid body entities. Each RigidLink is connected to its parent link via a RigidJoint.
- get_anchor_pos()[source]#
Get the anchor position of the joint in the world frame.
Mathematically, the anchor point corresponds to the point that is fixed wrt parent link and is coincident with the joint for the neutral configuration qpos0. This means that this point moves under the effect of the generalized coordinates corresponding to this joint (and all its ancestors in the kinematic tree). Physically, the anchor point is the “output” of the joint transmission, on which the child body is welded.
- get_anchor_axis()[source]#
Get the anchor axis of the joint in the world frame.
See
RigidJoint.get_anchor_posdocumentation for details about the notion on anchor point.
- get_sol_params()[source]#
Get the solver parameters the simulation is currently using for this joint.
- property uid#
Returns the unique id of the joint.
- property name#
Returns the name of the joint.
- property entity#
Returns the entity that the joint belongs to.
- property solver#
The RigidSolver object that the joint belongs to.
- property link#
Returns the child link that of the joint.
- property idx#
Returns the global index of the joint in the rigid solver.
- property idx_local#
Returns the local index of the joint in the entity.
- property init_qpos#
Returns the initial joint position.
- property n_qs#
Returns the number of
q(generalized coordinate) variables that the joint has.
- property n_dofs#
Returns the number of dofs that the joint has.
- property type#
Returns the type of the joint.
- property pos#
Returns the initial position of the joint in the world frame.
- property quat#
Returns the initial quaternion of the joint in the world frame.
- property q_start#
Returns the starting index of the
qvariables of the joint in the rigid solver.
- property dof_start#
Returns the starting index of the dofs of the joint in the rigid solver.
- property q_end#
Returns the ending index of the
qvariables of the joint in the rigid solver.
- property dof_end#
Returns the ending index of the dofs of the joint in the rigid solver.
- property dofs_idx#
Returns all the Degrees’ of Freedom (DoF) indices of the joint in the rigid solver as a sequence.
- property dofs_idx_local#
Returns the local Degrees of Freedom indices of the joint in the entity.
- property qs_idx#
Returns all the position indices of the joint in the rigid solver.
- property qs_idx_local#
Returns all the local
qindices of the joint in the entity.
- property dofs_length#
Returns the characteristic length of each dof, used to put dof velocities on a common linear (m/s) scale. Shape is (n_dofs,), or (n_dofs, n_envs) for a heterogeneous entity whose variants differ per environment.
A translational dof has length 1, so its velocity is already a linear speed. A rotational dof has the swept radius of the body as its length, so that multiplying it by an angular velocity gives the linear surface speed that rotation produces; this makes a single velocity tolerance meaningful across mixed dofs (e.g. for hibernation). By default the radius is per-axis: the largest perpendicular distance from that dof’s own rotation axis (through the joint anchor) to the geometry. With MuJoCo compatibility it is instead MuJoCo’s dof_length: a single bounding-sphere radius about the body COM, shared by every rotational dof. For a heterogeneous entity each variant’s geoms are active in their own environments, so the radius is per env.
- property is_built#
Returns whether the entity the joint belongs to is built.
Joint types#
The value returned by RigidJoint.type.