RigidJoint(刚体关节)#

class genesis.engine.entities.rigid_entity.rigid_joint.RigidJoint(entity, name, idx, link_idx, q_start, dof_start, n_qs, n_dofs, type, pos, quat, init_qpos, sol_params, dofs_motion_ang, dofs_motion_vel, dofs_limit, dofs_invweight, dofs_frictionloss, dofs_stiffness, dofs_damping, dofs_armature, dofs_kp, dofs_kv, dofs_force_range)[source]#

Bases: RBC

Joint class for rigid body entities. Each RigidLink is connected to its parent link via a RigidJoint.

get_pos()[source]#

Get the position of the joint in the world frame.

get_quat()[source]#

Get the quaternion of the joint in the world frame.

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_pos documentation for details about the notion on anchor point.

set_sol_params(sol_params)[source]#

Set the solver parameters of this joint.

property sol_params#

Returns the solver parameters of the 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.

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 q variables 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 q variables 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 q indices of the joint in the entity.

property dofs_motion_ang#
property dofs_motion_vel#
property dofs_limit#

Returns the range limit of the dofs of the joint.

property dofs_invweight#

Returns the invweight of the dofs of the joint.

property dofs_frictionloss#

Returns the frictionloss of the dofs of the joint.

property dofs_stiffness#

Returns the stiffness of the dofs of the joint.

property dofs_damping#

Returns the damping of the dofs of the joint.

property dofs_armature#

Returns the armature of the dofs of the joint.

property dofs_kp#

Returns the kp (positional gain) of the dofs of the joint.

property dofs_kv#

Returns the kv (velocity gain) of the dofs of the joint.

property dofs_force_range#

Returns the force range of the dofs of the joint.

property is_built#

Returns whether the entity the joint belongs to is built.