(trajectory: Dict[str, Any])
| 93 | |
| 94 | |
| 95 | def ppgm_dataset_transform(trajectory: Dict[str, Any]) -> Dict[str, Any]: |
| 96 | trajectory["action"] = tf.concat( |
| 97 | [ |
| 98 | trajectory["action"][:, :6], |
| 99 | binarize_gripper_actions(trajectory["action"][:, -1])[:, None], |
| 100 | ], |
| 101 | axis=1, |
| 102 | ) |
| 103 | trajectory["observation"]["EEF_state"] = trajectory["observation"][ |
| 104 | "cartesian_position" |
| 105 | ][:, :6] |
| 106 | trajectory["observation"]["gripper_state"] = trajectory["observation"][ |
| 107 | "gripper_position" |
| 108 | ][:, -1:] |
| 109 | return trajectory |
| 110 | |
| 111 | |
| 112 | def rt1_dataset_transform(trajectory: Dict[str, Any]) -> Dict[str, Any]: |
nothing calls this directly
no test coverage detected