Record a simulation in a mocap .bvh file

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
dalek405
Posts: 1
Joined: Sun Mar 13, 2022 5:14 am

Record a simulation in a mocap .bvh file

Post by dalek405 »

Hi,

I used a reinforcement learning model to keep an humanoid robot standing up and would like to record its motion in a bvh file. I could then applied this motion in blender where i've made a human model and a scene to record a short animation. My problem is that I have not seen anything allowing to do this easily and I even try to do it manually but it still does not work well. So I would like to know if you know a way to do this easily or know of a different suggestion.

If I should keep going with my own way, I would appreciate some pointer to how to transform the translations and rotations from the pybullet simulator coordinate system to the equivalent translations and rotations in the coordinate system use by the bvh file format that I will use in blender. As of now I made the bvh hierachy part and recorded the root joint as the world translation and orientation. Then, I recorded the world orientation difference between each fix joint and their respective parent to get the orientation for each bone in the body reference. After inverting the y and z axis, the result look close to what it is suppose to be, but I'm still missing something.

Thanks for the support!
Post Reply