@@ -64,12 +64,12 @@ class MapDeltaActionToRobotAction(ActionProcessorStep):
64
64
Output ACTION keys:
65
65
{
66
66
"action.enabled": bool,
67
- "action.target_x ": float,
68
- "action.target_y ": float,
69
- "action.target_z ": float,
70
- "action.target_wx ": float,
71
- "action.target_wy ": float,
72
- "action.target_wz ": float,
67
+ "action.displacement_x ": float,
68
+ "action.displacement_y ": float,
69
+ "action.displacement_z ": float,
70
+ "action.displacement_wx ": float,
71
+ "action.displacement_wy ": float,
72
+ "action.displacement_wz ": float,
73
73
"action.gripper": float,
74
74
}
75
75
"""
@@ -99,19 +99,19 @@ def action(self, action: dict) -> dict:
99
99
100
100
# For gamepad/keyboard, we don't have rotation input, so set to 0
101
101
# These could be extended in the future for more sophisticated teleoperators
102
- target_wx = 0.0
103
- target_wy = 0.0
104
- target_wz = 0.0
102
+ displacement_wx = 0.0
103
+ displacement_wy = 0.0
104
+ displacement_wz = 0.0
105
105
106
- # Update action with robot target format
106
+ # Update action with robot displacement format
107
107
action = {
108
108
"action.enabled" : enabled ,
109
- "action.target_x " : scaled_delta_x ,
110
- "action.target_y " : scaled_delta_y ,
111
- "action.target_z " : scaled_delta_z ,
112
- "action.target_wx " : target_wx ,
113
- "action.target_wy " : target_wy ,
114
- "action.target_wz " : target_wz ,
109
+ "action.displacement_x " : scaled_delta_x ,
110
+ "action.displacement_y " : scaled_delta_y ,
111
+ "action.displacement_z " : scaled_delta_z ,
112
+ "action.displacement_wx " : displacement_wx ,
113
+ "action.displacement_wy " : displacement_wy ,
114
+ "action.displacement_wz " : displacement_wz ,
115
115
"action.gripper" : float (gripper ),
116
116
}
117
117
@@ -123,12 +123,12 @@ def transform_features(self, features: dict[str, PolicyFeature]) -> dict[str, Po
123
123
features .update (
124
124
{
125
125
"action.enabled" : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
126
- "action.target_x " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
127
- "action.target_y " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
128
- "action.target_z " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
129
- "action.target_wx " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
130
- "action.target_wy " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
131
- "action.target_wz " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
126
+ "action.displacement_x " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
127
+ "action.displacement_y " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
128
+ "action.displacement_z " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
129
+ "action.displacement_wx " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
130
+ "action.displacement_wy " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
131
+ "action.displacement_wz " : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
132
132
"action.gripper" : PolicyFeature (type = FeatureType .ACTION , shape = (1 ,)),
133
133
}
134
134
)
0 commit comments