mani_skill.trajectory.merge_trajectory ====================================== .. py:module:: mani_skill.trajectory.merge_trajectory Functions --------- .. autoapisummary:: mani_skill.trajectory.merge_trajectory.main mani_skill.trajectory.merge_trajectory.merge_trajectories Module Contents --------------- .. py:function:: main() .. py:function:: merge_trajectories(output_path, traj_paths, recompute_id = True) Merges multiple JSON and H5 files into a single JSON and H5 file. This function combines the contents of multiple JSON and H5 files. It keeps the first value for all keys (other than "episodes") and logs a warning for any differences. The "episodes" from each JSON file are merged into a single list, and the corresponding H5 data is copied to the output H5 file. :param output_path: The path to the output H5 file. The corresponding JSON file will be saved with the same name but with a .json extension. :type output_path: str :param traj_paths: A list of paths to the input trajectory files (H5 files). The corresponding JSON files should have the same name but with a .json extension. :type traj_paths: list :param recompute_id: If True, recompute the episode IDs to ensure they are unique. If False, keep the original episode IDs. :type recompute_id: bool :raises AssertionError: If there is a conflict in the episode IDs when recompute_id is False.