KillzoneCC commited on
Commit ·
581cd7b
1
Parent(s): a034807
Порядочное действие по столбцам
Browse files200 unmodified lines20120220320420520620420520620720820917 unmodified lines2272282292302312302312322332332342352362372382352392402412392422432442452462472412422482492502512522532542552562572582592602612622632642651 unmodified line26726826925025125227027127227327425527527627727874 unmodified lines35335435535635735835941 unmodified lines401402403404405406407200 unmodified lines info_path = META_DIR / "info.json" episodes_jsonl_path = META_DIR / "episodes.jsonl" episode_idx = 0 episodes_data = []
# Создаем список имен для 26 сервоприводов joint_names = [f"servo_{i+1}" for i in range(26)] # --- Определение задач (пример) --- tasks_list = [17 unmodified lines if not info: info = { "codebase_version": "v1.1", "total_frames": 0, "codebase_version": "v2.1", "robot_type": "ainex_robot", "total_episodes": 0, "episode_lengths": [], "total_frames": 0, "total_tasks": len(tasks_list), "total_videos": 0, "total_chunks": 1, "chunks_size": 1000, "fps": 30, "robot_type": "ainex_robot", "data_path": "data/chunk-000/episode_{episode_index:06d}.parquet", "video_path": "videos/chunk-000/observation.images.generic/episode_{episode_index:06d}.mp4", "features": { "action": { "dtype": "float32", "shape": [26] }, "action": { "dtype": "float32", "shape": [26], "names": joint_names }, "observation": { "joint_positions": { "dtype": "float32", "shape": [26] }, "imu": { "dtype": "float32", "shape": [10] }, "joint_positions": { "dtype": "float32", "shape": [26], "names": joint_names }, "state": { "dtype": "float32", "shape": [26], "names": joint_names }, "imu": { "dtype": "float32", "shape": [10], "names": ["orientation.x", "orientation.y", "orientation.z", "orientation.w", "angular_velocity.x", "angular_velocity.y", "angular_velocity.z", "linear_acceleration.x", "linear_acceleration.y", "linear_acceleration.z"] }, "images.generic": { "dtype": "video", "media_type": "video/mp4",1 unmodified line "shape": [480, 640, 3] } }, "timestamp": { "dtype": "float64" }, "frame_index": { "dtype": "int64" }, "episode_index": { "dtype": "int64" } "timestamp": { "dtype": "float64", "shape": [1] }, "frame_index": { "dtype": "int64", "shape": [1] }, "episode_index": { "dtype": "int64", "shape": [1] } } }
if episodes_jsonl_path.exists(): try: with open(episodes_jsonl_path, 'r', encoding='utf-8') as f:74 unmodified lines df = pd.DataFrame({ 'observation.images.generic': [f"../../videos/chunk-000/observation.images.generic/episode_{episode_idx:06d}.mp4"] * len(all_images_generic), 'observation.joint_positions': all_joint_positions, 'observation.state': all_joint_positions, # Используем те же данные для state 'observation.imu': all_imu_data, 'action.servo_commands': all_actions, 'timestamp': all_timestamps,41 unmodified lines df = pd.DataFrame({ 'observation.images.generic': [f"../../videos/chunk-000/observation.images.generic/episode_{episode_idx:06d}.mp4"] * len(all_images_generic), 'observation.joint_positions': all_joint_positions, 'observation.state': all_joint_positions, # Используем те же данные для state 'observation.imu': all_imu_data, 'action.servo_commands': all_actions, 'timestamp': all_timestamps,collect_and_upload.py+36-14