MCPcopy Create free account
hub / github.com/SpatialVLA/SpatialVLA / droid_wristact_transform

Function droid_wristact_transform

data/utils/droid_utils.py:100–129  ·  view source on GitHub ↗

DROID dataset transformation for actions expressed in *wrist* frame of the robot.

(trajectory: Dict[str, Any])

Source from the content-addressed store, hash-verified

98
99
100def 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
132def droid_finetuning_transform(trajectory: Dict[str, Any]) -> Dict[str, Any]:

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected