DROID dataset transformation for actions expressed in *wrist* frame of the robot.
(trajectory: Dict[str, Any])
| 98 | |
| 99 | |
| 100 | def droid_wristact_transform(trajectory: Dict[str, Any]) -> Dict[str, Any]: |
| 101 | """ |
| 102 | DROID dataset transformation for actions expressed in *wrist* frame of the robot. |
| 103 | """ |
| 104 | wrist_act = velocity_act_to_wrist_frame( |
| 105 | trajectory["action_dict"]["cartesian_velocity"], |
| 106 | trajectory["observation"]["cartesian_position"], |
| 107 | ) |
| 108 | trajectory["action"] = tf.concat( |
| 109 | ( |
| 110 | wrist_act, |
| 111 | trajectory["action_dict"]["gripper_position"], |
| 112 | ), |
| 113 | axis=-1, |
| 114 | ) |
| 115 | ( |
| 116 | trajectory["observation"]["exterior_image_1_left"], |
| 117 | trajectory["observation"]["exterior_image_2_left"], |
| 118 | ) = rand_swap_exterior_images( |
| 119 | trajectory["observation"]["exterior_image_1_left"], |
| 120 | trajectory["observation"]["exterior_image_2_left"], |
| 121 | ) |
| 122 | trajectory["observation"]["proprio"] = tf.concat( |
| 123 | ( |
| 124 | trajectory["observation"]["cartesian_position"], |
| 125 | trajectory["observation"]["gripper_position"], |
| 126 | ), |
| 127 | axis=-1, |
| 128 | ) |
| 129 | return trajectory |
| 130 | |
| 131 | |
| 132 | def droid_finetuning_transform(trajectory: Dict[str, Any]) -> Dict[str, Any]: |
nothing calls this directly
no test coverage detected