@@ -83,6 +83,9 @@ def calculate_result(
83
83
if ini_carrot .name == final_carrot .name :
84
84
initial_y = ini_carrot .pose .translation .y
85
85
final_y = final_carrot .pose .translation .y
86
+ # NOTE the specific coords that refer to for example
87
+ # middle of the table can differ across simulations,
88
+ # take that into consideration
86
89
if (
87
90
initial_y <= 0.0
88
91
): # Carrot started in the incorrect place (right side)
@@ -144,7 +147,9 @@ def calculate_result(
144
147
else :
145
148
ini_poses = [cube .pose for cube in initial_cubes ]
146
149
final_poses = [cube .pose for cube in final_cubes ]
147
-
150
+ # NOTE the specific coords that refer to for example
151
+ # middle of the table can differ across simulations,
152
+ # take that into consideration
148
153
for ini_cube in initial_cubes :
149
154
for final_cube in final_cubes :
150
155
if ini_cube .name == final_cube .name :
@@ -175,26 +180,6 @@ def calculate_result(
175
180
return (corrected_objects + unchanged_correct ) / num_of_objects
176
181
177
182
178
- def request_to_base_position () -> ManipulatorMoveTo .Request :
179
- request = ManipulatorMoveTo .Request ()
180
- request .initial_gripper_state = True
181
- request .final_gripper_state = False
182
-
183
- request .target_pose = PoseStamped ()
184
- request .target_pose .header = Header ()
185
- request .target_pose .header .frame_id = "panda_link0"
186
-
187
- request .target_pose .pose .position .x = 0.3
188
- request .target_pose .pose .position .y = 0.0
189
- request .target_pose .pose .position .z = 0.5
190
-
191
- request .target_pose .pose .orientation .x = 1.0
192
- request .target_pose .pose .orientation .y = 0.0
193
- request .target_pose .pose .orientation .z = 0.0
194
- request .target_pose .pose .orientation .w = 0.0
195
- return request
196
-
197
-
198
183
if __name__ == "__main__" :
199
184
rclpy .init ()
200
185
connector = ROS2ARIConnector ()
@@ -292,7 +277,6 @@ def request_to_base_position() -> ManipulatorMoveTo.Request:
292
277
293
278
# custom request to arm
294
279
base_arm_pose = PoseModel (translation = Translation (x = 0.3 , y = 0.0 , z = 0.4 ))
295
- request = request_to_base_position ()
296
280
297
281
# define benchamrk
298
282
benchmark = Benchmark (
0 commit comments