BartMoyaers / BvhToDeepMimic

Convert .bvh files (Biovision Hierarchy) to DeepMimic format.
MIT License
65 stars 12 forks source link

Joint not found: Conversion from fbx@blender to bvh (via blender) then to Deep_Mimic via BvhToDeepMimic #14

Open rohit-kumar-j opened 3 years ago

rohit-kumar-j commented 3 years ago

Steps to reproduce the error:

  1. Installed blender sudo apt install blender
  2. Imported .fbx file from mixamo.com
  3. Exported .bvh from blender
  4. Tried to run this: (script.py)
    
    # Imports
    # ===========================================================================

import json import os from os import listdir from os.path import isfile, join from bvhtomimic import BvhConverter

converter = BvhConverter("./Settings/settings.json") converter.convertBvhFile("/home/rkj/Work/BvhToDeepMimic/input/OG_Rig.bvh", loop=False)

5. Produced Error:

rkj@Strix:~/Work/BvhToDeepMimic$ python3 -m script Traceback (most recent call last): File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/rkj/Work/BvhToDeepMimic/script.py", line 11, in converter.convertBvhFile("/home/rkj/Work/BvhToDeepMimic/input/OG_Rig.bvh", loop=False) File "/home/rkj/Work/BvhToDeepMimic/bvhtomimic.py", line 13, in convertBvhFile jointHandler = BvhJointHandler(mocap, settingsPath=self.setting_path) File "/home/rkj/Work/BvhToDeepMimic/bvhtodeepmimic/bvh_joint_handler.py", line 40, in init rotationChannelNames, File "/home/rkj/Work/BvhToDeepMimic/bvhtodeepmimic/bvh_joint.py", line 17, in init self.offset = np.array(mocap.joint_offset(self.name)) File "/home/rkj/.local/lib/python3.6/site-packages/bvh.py", line 129, in joint_offset joint = self.get_joint(name) File "/home/rkj/.local/lib/python3.6/site-packages/bvh.py", line 126, in get_joint raise LookupError('joint not found') LookupError: joint not found


**Desktop (please complete the following information):**

rkj@Strix:~$ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.2 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal



**Additional context**
Refer #13