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

is there a way to obtain the joints position? #8

Closed
visonpon opened this issue Jun 1, 2021 · 2 comments
Closed

is there a way to obtain the joints position? #8

visonpon opened this issue Jun 1, 2021 · 2 comments

Comments

@visonpon
Copy link

visonpon commented Jun 1, 2021

Hi @davrempe, thanks for your great work and I have got some good results based on your code.
I also would like to know how to get and save joints especially the root position, hope you can give some advice, thanks~

@davrempe
Copy link
Owner

davrempe commented Jun 2, 2021

Yes, joints can be extracted from the output BVH files using skeleton_fitting/ik/BVH and skeleton_fitting/ik/Animation. Concretely, for the example data (dance1) which has final results in dance1_ybot_durations.bvh, you can use something like:

sys.path.extend(['skeleton_fitting/ik'])
import BVH
import Animation

anim, _, _ = BVH.load('path/to/dance1_ybot_durations.bvh')
joint_pos = Animation.positions_global(anim)

You can see a simliar example in the visualization script where I find the mean root position over time. To get information about joint ordering for the character you are using, see this script.

@davrempe davrempe closed this as completed Jun 2, 2021
@visonpon
Copy link
Author

visonpon commented Jun 9, 2021

Hi@davrempe, thanks for your responce, I got another question that hope you can help.
In the character_info_utils.py,there are joints' index mapping between different models, I want to try the mapping between my own T pose and the combined model, but I don't know how to do it since the mapping seems like a manual design, can you give some more details about this?

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