Skip to content

Commit a43947f

Browse files
committed
Added code to help debug fork off-center issues (#202)
Added commented out code to fix the food frame, e.g., for debugging
1 parent f67427e commit a43947f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

ada_feeding/ada_feeding/behaviors/acquisition/compute_food_frame.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,30 @@ def update(self) -> py_trees.common.Status:
336336
x_unit.vector, x_pos.vector
337337
)
338338

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+
339363
# Write to blackboard outputs
340364
if len(self.blackboard_get("food_frame_id")) > 0:
341365
set_static_tf(world_to_food_transform, self.blackboard, self.node)

0 commit comments

Comments
 (0)