ZhengyiLuo / UHC

Official Implementation of the Universal Humanoid Controller in Mujoco. Supports Kinpoly (NeurIPS 2021) and EmbodiedPose (NeurIPS 2022).
https://zhengyiluo.github.io/projects/embodied_pose/
Other
197 stars 21 forks source link

generate Smpl-x robot for IsaacGym #33

Closed LJF1113 closed 2 weeks ago

LJF1113 commented 5 months ago

Hello, thanks for all your works! When I run python uhc/smpllib/smpl_local_robot.py robot_cfg = { 'model': "smplx", "mesh": False, "rel_joint_lm": False, "upright_start": False, "remove_toe": False, "real_weight": True, "real_weight_porpotion": True, "replace_feet": True, "masterfoot": False, "big_ankle": True, "master_range": 50, "body_params": {}, "joint_params": {}, "geom_params": {}, "actuator_params": {}, }

I encounter a bug as follow: Traceback (most recent call last): File "uhc/smpllib/smpl_local_robot.py", line 2385, in smpl_robot = Robot(robot_cfg) File "uhc/smpllib/smpl_local_robot.py", line 1203, in init self.load_from_skeleton() File "uhc/smpllib/smpl_local_robot.py", line 1380, in load_from_skeleton verts, joints, skin_weights, joint_names, joint_offsets, parents_dict, channels, joint_range = smpl_parser.get_offsets(betas=self.beta, zero_pose=zero_pose) File "/home/ubuntu/disk1/Hand_object/UHC/uhc/smpllib/smpl_parser_local.py", line 624, in get_offsets verts, Jtr = self.get_joints_verts(zero_pose, th_betas=betas) File "/home/ubuntu/disk1/Hand_object/UHC/uhc/smpllib/smpl_parser_local.py", line 602, in get_joints_verts smpl_output = self.forward( File "/home/ubuntu/disk1/Hand_object/UHC/uhc/smpllib/smpl_parser_local.py", line 587, in forward smpl_output = super(SMPLX_Parser, self).forward(*args, *kwargs) File "/home/ubuntu/anaconda3/envs/uhc/lib/python3.8/site-packages/smplx/body_models.py", line 1230, in forward vertices, joints = lbs(shape_components, full_pose, self.v_template, File "/home/ubuntu/anaconda3/envs/uhc/lib/python3.8/site-packages/smplx/lbs.py", line 205, in lbs v_shaped = v_template + blend_shapes(betas, shapedirs) File "/home/ubuntu/anaconda3/envs/uhc/lib/python3.8/site-packages/smplx/lbs.py", line 291, in blend_shapes blend_shape = torch.einsum('bl,mkl->bmk', [betas, shape_disps]) File "/home/ubuntu/anaconda3/envs/uhc/lib/python3.8/site-packages/torch/functional.py", line 358, in einsum return einsum(equation, _operands) File "/home/ubuntu/anaconda3/envs/uhc/lib/python3.8/site-packages/torch/functional.py", line 360, in einsum return _VF.einsum(equation, operands) # type: ignore[attr-defined] RuntimeError: einsum(): operands do not broadcast with remapped shapes [original->remapped]: [1, 30]->[1, 1, 1, 30] [10475, 3, 20]->[1, 10475, 3, 20]

Jatinkalal commented 2 weeks ago

Hey, have you solved this issue? If yes could you share how? Thanks

ZhengyiLuo commented 2 weeks ago

Hi! Please refer to SMPLSim and the PHC codebases for SMPL-X humanoid support. PHC already supports training SMPL-X humanoids.