Skip to content

"action": state_qpos.reshape((epi_len, -1)), #24

@RuiboLiu77

Description

@RuiboLiu77

Hello, thank you very much for your open-source project.
I got a question about the hdf5 data loading process, I notice that in function in below:

def load_hdf5_dataset(
episode_path: str | Path,
) -> dict:
"""Load hdf5 dataset and return a dict with observations and actions"""

with h5py.File(episode_path) as f:
    state_images_cam_high = np.array(f["observations/images/cam_high"])
    state_images_cam_left_wrist = np.array(f["observations/images/cam_left_wrist"])
    state_images_cam_right_wrist = np.array(f["observations/images/cam_right_wrist"])
    state_qpos = np.array(f["observations/qpos"])

assert (
    state_images_cam_high.shape[0]
    == state_images_cam_left_wrist.shape[0]
    == state_images_cam_right_wrist.shape[0]
    == state_qpos.shape[0]
)

epi_len = state_images_cam_high.shape[0]
episode = {
    "observation.state": state_qpos.reshape((epi_len, -1)),
    "observation.images.top_head": state_images_cam_high,
    "observation.images.hand_left": state_images_cam_left_wrist,
    "observation.images.hand_right": state_images_cam_right_wrist,
    "action": state_qpos.reshape((epi_len, -1)),
    "epi_len": epi_len
}
return episode

you use state_qpos as action input, is that a special design or a mini bug? That cofuse me a bit
Thank you for your attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions