DROID dataset transformation for actions expressed in *base* frame of the robot.
(trajectory: Dict[str, Any])
| 130 | |
| 131 | |
| 132 | def droid_finetuning_transform(trajectory: Dict[str, Any]) -> Dict[str, Any]: |
| 133 | """ |
| 134 | DROID dataset transformation for actions expressed in *base* frame of the robot. |
| 135 | """ |
| 136 | dt = trajectory["action_dict"]["cartesian_velocity"][:, :3] |
| 137 | dR = trajectory["action_dict"]["cartesian_velocity"][:, 3:6] |
| 138 | trajectory["action"] = tf.concat( |
| 139 | ( |
| 140 | dt, |
| 141 | dR, |
| 142 | 1 - trajectory["action_dict"]["gripper_position"], |
| 143 | ), |
| 144 | axis=-1, |
| 145 | ) |
| 146 | trajectory["observation"]["proprio"] = tf.concat( |
| 147 | ( |
| 148 | trajectory["observation"]["cartesian_position"], |
| 149 | trajectory["observation"]["gripper_position"], |
| 150 | ), |
| 151 | axis=-1, |
| 152 | ) |
| 153 | return trajectory |
| 154 | |
| 155 | |
| 156 | def zero_action_filter(traj: Dict) -> bool: |
nothing calls this directly
no outgoing calls
no test coverage detected