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

Function droid_finetuning_transform

data/utils/droid_utils.py:132–153  ·  view source on GitHub ↗

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

(trajectory: Dict[str, Any])

Source from the content-addressed store, hash-verified

130
131
132def 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
156def zero_action_filter(traj: Dict) -> bool:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected