Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format of data passed to recover_from_ric? #20

Open
aniongithub opened this issue Feb 22, 2023 · 2 comments
Open

Format of data passed to recover_from_ric? #20

aniongithub opened this issue Feb 22, 2023 · 2 comments

Comments

@aniongithub
Copy link
Contributor

aniongithub commented Feb 22, 2023

What is the layout of the data passed in to recover_from_ric? I'd like to just get the local rotations and translations of each bone and do my own FK on it instead of getting absolute positions.

@EricGuo5513
Copy link
Owner

EricGuo5513 commented Feb 22, 2023 via email

@aniongithub
Copy link
Contributor Author

aniongithub commented Jul 10, 2023

When I try to call recover_from_rot, the code fails in skeleton.py with the stacktrace below

  File "gen_motion_script.py", line 199, in <module>
    plot_t2m(motion, pjoin(animation_save_path, 'gen_motion_%02d_L%03d' % (t, motion.shape[1])), captions)
  File "gen_motion_script.py", line 23, in plot_t2m
    joint_rot = recover_from_rot(torch.from_numpy(joint_data).float(), opt.joints_num, skel)
  File "/workspaces/text-to-motion/scripts/motion_process.py", line 396, in recover_from_rot
    positions = skeleton.forward_kinematics_cont6d(cont6d_params, r_pos)
  File "/workspaces/text-to-motion/common/skeleton.py", line 180, in forward_kinematics_cont6d
    if len(self._offset.shape) == 2:
AttributeError: 'NoneType' object has no attribute 'shape'

Specifically at line 180 because self._offset is None.

Please note that I just want the local rotations of each bone as quaternions, I am not interested in FK because my own animation system will implement that. Given the packing of the data, could you please help me with extracting the components (especially rot_data) you've indicated and clarify if rot_data is indeed the local quaternion rotations of each bone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants