rlightning.humanoid.utils.lafan_vendor.extract¶
- class rlightning.humanoid.utils.lafan_vendor.extract.Anim(quats: MockModule('torch.Tensor'), pos: MockModule('torch.Tensor'), offsets: MockModule('torch.Tensor'), parents: Any, bones: List[str], frametime: float, fps: float = None)[source]¶
Bases:
objectBasic animation structure
- offsets: MockModule('torch.Tensor')¶
Local joint offsets
- pos: MockModule('torch.Tensor')¶
Local positions
- quats: MockModule('torch.Tensor')¶
Local quaternions
- rlightning.humanoid.utils.lafan_vendor.extract.get_lafan1_set(bvh_path: str, actors, window=50, offset=20)[source]¶
Extract the same test set as in the article, given the location of the BVH files.
- Parameters:
bvh_path – Path to the dataset BVH files
list – actor prefixes to use in set
window – width of the sliding windows (in timesteps)
offset – offset between windows (in timesteps)
- Returns:
tuple: X: local positions Q: local quaternions parents: list of parent indices defining the bone hierarchy contacts_l: binary tensor of left-foot contacts of shape (Batchsize, Timesteps, 2) contacts_r: binary tensor of right-foot contacts of shape (Batchsize, Timesteps, 2)
- rlightning.humanoid.utils.lafan_vendor.extract.get_train_stats(bvh_folder, train_set)[source]¶
Extract the same training set as in the paper in order to compute the normalizing statistics :return: Tuple of (local position mean vector, local position standard deviation vector, local joint offsets tensor)
- rlightning.humanoid.utils.lafan_vendor.extract.read_bvh(filename: str, start: int = None, end: int = None, order=None) Anim[source]¶
Reading a BVH file and extracts animation information.