@@ -336,6 +336,30 @@ def update(self) -> py_trees.common.Status:
336
336
x_unit .vector , x_pos .vector
337
337
)
338
338
339
+ # # If you need to send a fixed food frame to the robot arm, e.g., to
340
+ # # debug off-centering issues, uncomment this and modify the translation.
341
+ # deg = 90 # fork roll
342
+ # world_to_food_transform.transform.translation.x = 0.26262263022586224
343
+ # world_to_food_transform.transform.translation.y = -0.2783553055166875
344
+ # world_to_food_transform.transform.translation.z = 0.17773121634396466
345
+ # world_to_food_transform.transform.rotation.x = 0.0
346
+ # world_to_food_transform.transform.rotation.y = 0.0
347
+ # if deg == 0:
348
+ # world_to_food_transform.transform.rotation.z = 0.0
349
+ # world_to_food_transform.transform.rotation.w = 1.0
350
+ # elif deg == 90:
351
+ # world_to_food_transform.transform.rotation.z = 0.7071068
352
+ # world_to_food_transform.transform.rotation.w = 0.7071068
353
+ # elif deg == -90:
354
+ # world_to_food_transform.transform.rotation.z = -0.7071068
355
+ # world_to_food_transform.transform.rotation.w = 0.7071068
356
+ # elif deg == 180:
357
+ # world_to_food_transform.transform.rotation.z = 1.0
358
+ # world_to_food_transform.transform.rotation.w = 0.0
359
+ # else:
360
+ # self.logger.error(f"Invalid deg: {deg}")
361
+ # return py_trees.common.Status.FAILURE
362
+
339
363
# Write to blackboard outputs
340
364
if len (self .blackboard_get ("food_frame_id" )) > 0 :
341
365
set_static_tf (world_to_food_transform , self .blackboard , self .node )
0 commit comments