| ### Generate RGB Data |
|
|
| This step converts state-based trajectories into two-view RGB observations (third-person view + hand view) using [ManiSkill3](https://maniskill.readthedocs.io/en/latest/user_guide/getting_started/installation.html). |
|
|
| #### Prerequisites |
|
|
| - The `.h5` trajectory file and its corresponding `.json` metadata file must be placed in the **same directory**. |
| - The provided dataset contains 1,100 state-based trajectories for the **StackCube** task. |
|
|
| #### Usage |
|
|
| Run the following command within your ManiSkill3 environment: |
|
|
| ```bash |
| python -m mani_skill.trajectory.replay_trajectory \ |
| --traj-path /path/to/stackcube_000_0_1100.h5 \ |
| --use-first-env-state -c pd_ee_delta_pose -o rgb \ |
| --save-traj --num-envs 10 -b physx_cpu |
| ``` |
|
|
| #### Adjusting Image Resolution |
|
|
| The default resolution is **128×128**. To change it, edit the `.json` metadata file and add the `width` and `height` fields under `sensor_configs`. For example, to set the resolution to **256×256**: |
|
|
| ```jsonc |
| { |
| "env_info": { |
| "env_id": "StackCube-v1", |
| "env_kwargs": { |
| "obs_mode": "none", |
| "control_mode": "pd_joint_pos", |
| "render_mode": "rgb_array", |
| "sensor_configs": { |
| "shader_pack": "default", |
| "width": 256, // ← add this |
| "height": 256 // ← add this |
| }, |
| "human_render_camera_configs": { |
| "shader_pack": "default" |
| }, |
| "viewer_camera_configs": { |
| "shader_pack": "default" |
| }, |
| "sim_backend": "auto" |
| }, |
| "max_episode_steps": 50 |
| } |
| // ... |
| } |
| ``` |