google-deepmind / google-deepmind/deepmind-research

Parsing Catch and Carry Data

Open
#264 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
15.2k
Forks
2.9k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to make use of the training data in the **Catch and Carry** project. I would like to use the data **outside MuJuCo**. So I would like to be able to create Numpy skeletons from the given `h5` file **without** using any MuJuCo functionalities. Specifically what I need is : skeleton tree, rotation of each joint, root rotation, and root position.

I managed to get the skeleton tree from the [XML file](https://github.com/deepmind/dm_control/blob/a243ccf3c93f4e6aa2479e461cf935b879f3bb0b/dm_control/suite/humanoid_CMU.xml)

Here is how it looks so far:
![skeleton](https://user-images.githubusercontent.com/32509797/129199968-3a5cbfd7-b6bc-4be6-8647-3ab1bd6f42b6.png)

I see the `h5` has `joints` in the shape of `num_dof*num_frames`. I am not sure what exactly is this. I assume this is the rotation angle around the axis of rotation specified in the XML file? Is that correct?
I also assume the rotation for each joint is relative to the parent.
I see the file contains also `body_quaternions` but it seems to be empty `shape (0, num_frames)`

I would like to compute the rotation for each body part and not for each dof as in the `h5` file. Thus I computed the number of joints in each body part and then multiply the rotation of all joints in the same body part to get the rotation for the body part. So at the end instead of having rotations as `num_dof*num_frames`, I would like to get `num_body_parts*num_frames*4`. Assuming the rotations are in quaternions.
Here is how the first frame of clip_0 looks like
![clip_0](https://user-images.githubusercontent.com/32509797/129200340-a0587b5c-a426-4a3a-8325-867b4f007f38.png)

Any hints or ideas are appreciated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.