xbpeng / DeepMimic

Motion imitation with deep reinforcement learning.
https://xbpeng.github.io/projects/DeepMimic/index.html
MIT License
2.34k stars 488 forks source link

creating custom motion file #23

Open saisubramaniam147 opened 6 years ago

saisubramaniam147 commented 6 years ago

If I want to create my own motion file, is there a code or package I can use? The documentation mentions '3D rotations for spherical joints are specified as quaternions ', may I know how you are obtaining the keyframes and then converting them to quaternions?

xbpeng commented 6 years ago

Most formats like bvh and fbx store the keyframes are joint rotations, so you can just convert those to quaternions and copy them over into the specified format.

zhouzhq7 commented 5 years ago

Hi, I know how to transfer 3D Euler spatial rotation into quaternion. But I am wondering how to transfer 3d joint rotation into 1D rotation, since each joint has 3D rotation info in most of bvh files, such as the ones from CMU mocap dataset. May I know how you get the 1D rotation from the raw MOCAP data?

Somedaywilldo commented 5 years ago

Hello, I'm trying to create my own motion file, too. All I get is the 3D position(i.e. (x,y,z) ) of each joint. Also want to know if there exists packages converting these to rotations.

xbpeng commented 5 years ago

If you just have 3D joint positions, you can use inverse kinematics to calculate the corresponding joint rotations. There's probably some library out there that implements IK already.

Somedaywilldo commented 5 years ago

Thank you! I'll try later.

EnricoBeltramo commented 5 years ago

@Somedaywilldo did you find something? I need to do same thing.

angelaslin commented 5 years ago

How did you convert from the AMC/ASF files in the CMU motion capture database to the data files used in this project?

sloganking commented 5 years ago

@zhouzhq7 regarding converting 3D rotations to 1D, Isn't only one dimension of those three dimensions changed for knee and elbow joint rotation? It is in Unity which uses Euler rotations

cangcui commented 5 years ago

In my .bvh file, all of the joint(including the root and other joints) has 6 channels(xposition, yposition, zposition, zrotation, yrotation, xrotation) in the frame data, I converted the [zrotaion, yrotation, xroation] to the quaternion, but how to keep the [xposition, yposition, zposition] data in the motion file? Where should I adapt some code in Deepmimic project to support this specified format of motion file?

skylbc commented 5 years ago

@zhouzhq7 I want to create my own motion file use bvh file,if you have solved this problem,can you told me import bvh file?

sloganking commented 5 years ago

I've been working on converting .fbx file animations to mimic motion files in my own repository. If anyone has the same goal and would like to help, contributions are welcome. Here's my progress so far:

currentProgress

sloganking commented 5 years ago

I am now also working on converting .bvh files as I noticed the file format appears much easier to work with than .fbx files. Project repo found here. All contributions are welcome.

xbpeng commented 5 years ago

awesome, thanks! This could be very helpful.

Zju-George commented 5 years ago

I've been working on converting .fbx file animations to mimic motion files in my own repository. If anyone has the same goal and would like to help, contributions are welcome. Here's my progress so far:

currentProgress

Yes I need to achieve the same goal, (especially motion from SFV). So what's your newest progress?

BartMoyaers commented 5 years ago

@SleepingFox88 and myself have been working on the .bvh to DeepMimic conversion. You can find the current state of affairs in this repository.

Check it out, and help is always appreciated.

Here are some example conversions from this database: walking_example SpeedVault_example

hellozjj commented 4 years ago

@zhouzhq7 regarding converting 3D rotations to 1D, Isn't only one dimension of those three dimensions changed for knee and elbow joint rotation? It is in Unity which uses Euler rotations

do you have the model for deepmimic humanoid? I want to get this. I am not good at unity.

hellozjj commented 4 years ago

@zhouzhq7 regarding converting 3D rotations to 1D, Isn't only one dimension of those three dimensions changed for knee and elbow joint rotation? It is in Unity which uses Euler rotations

I couldn't open this link. In unity, when using Euler rotations, there still are all of three dimensions changing as I play motions. Could you tell me why there is only one dimensions changing for knee and elbow?

hellozjj commented 4 years ago

@SleepingFox88 I couldn't open this link. In unity, when using Euler rotations, there still are all of three dimensions changing as I play motions. Could you tell me why there is only one dimensions changing for knee and elbow?

gaoalexander commented 3 years ago

@zhouzhq7 regarding converting 3D rotations to 1D, Isn't only one dimension of those three dimensions changed for knee and elbow joint rotation? It is in Unity which uses Euler rotations

I couldn't open this link. In unity, when using Euler rotations, there still are all of three dimensions changing as I play motions. Could you tell me why there is only one dimensions changing for knee and elbow?

I'm wondering the same thing. More information on the retargeting process would be immensely helpful, as it seems like a fairly involved process!

zhouzhq7 commented 3 years ago

@zhouzhq7 regarding converting 3D rotations to 1D, Isn't only one dimension of those three dimensions changed for knee and elbow joint rotation? It is in Unity which uses Euler rotations

I couldn't open this link. In unity, when using Euler rotations, there still are all of three dimensions changing as I play motions. Could you tell me why there is only one dimensions changing for knee and elbow?

I'm wondering the same thing. More information on the retargeting process would be immensely helpful, as it seems like a fairly involved process!

There are three primary joint types, spherical, revolute, and fixed. The reason why we can use 1D data to represent rotations of knee or elbow is that both of them belong to the revolute joint which has only one DoF, and whose rotation axis normally is specifically assigned, such as z-axis. But for a spherical joint, three dimensions are all required since they have 3 DoFs.