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

question about the data #10

Open
liangyuxin42 opened this issue Feb 6, 2024 · 3 comments
Open

question about the data #10

liangyuxin42 opened this issue Feb 6, 2024 · 3 comments

Comments

@liangyuxin42
Copy link

liangyuxin42 commented Feb 6, 2024

Thanks for sharing this great work!
I have some questions about the data , I am reading the data through the following code:

h5 = h5py.File("/mobile_aloha/aloha_mobile_cabinet/episode_2.hdf5", 'r')
action = h5['/action'][()]
print(action.shape) # (1500, 14)
  1. is this 14 DoF = 2 arms * (6 joint positions + 1 gripper)?
  2. if so, is there some way to calculate end-effector positions from joint positions in order to convert the data into a similar form as RT-X data (7-dimensional action vector controlling the end-effector: x, y, z, roll, pitch, yaw, and gripper opening)
    I want to mix different robot data for training, so unifying the different formats would be very useful.

Thanks!

@asasarkaya
Copy link

@liangyuxin42 I am using the same link to get data, and the images are not three dimensional. Do you have any idea about this? I would appreciate any info. Here are some samples shapes of the images from ziploc data (on the other hand, when I record simulation data, they are recorded & loaded as 480,640,3, so they are fine) :

sample_image_cam_high: (22229,)
sample_image_cam_low: (24912,)
sample_image_cam_left_wrist: (17664,)
sample_image_cam_right_wrist: (18395,)

@liangyuxin42
Copy link
Author

liangyuxin42 commented Mar 20, 2024

@asasarkaya this is how i read the image

import h5py
import io
from PIL import Image
import numpy as np

h5 = h5py.File("/episode_2.hdf5", 'r')
i = 10
data = np.array(h5["/observations/images/cam_right_wrist"][:][i])
img = Image.open(io.BytesIO(data))
print(img.size)
img

the output is :
(640, 480)
image

hope this helps!

@asasarkaya
Copy link

thanks!

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