rlightning.humanoid.retarget.humanoid_batch

class rlightning.humanoid.retarget.humanoid_batch.HumanoidBatch(cfg: HumanoidBatchCfg, device: str = 'cpu')[source]

Bases: object

fk_batch(pose, trans, convert_to_mat=True, return_full=False, dt=0.03333333333333333)[source]
forward_kinematics_batch(rotations, root_rotations, root_positions)[source]

Perform forward kinematics using the given trajectory and local rotations. Arguments (where B = batch size, J = number of joints):

– rotations: (B, J, 4) tensor of unit quaternions describing the local rotations of each joint. – root_positions: (B, 3) tensor describing the root joint positions.

Output: joint positions (B, J, 3)

load_mesh()[source]
mesh_fk(pose=None, trans=None)[source]

Load the mesh from the XML file and merge them into the humanoid based on the current pose.