From 92d7bea2e09b9ff34aac64173a323d87be352c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pr=C3=BCser?= Date: Fri, 23 Feb 2024 11:33:20 +0100 Subject: [PATCH] [resolver] fixed querying from occupancy costmap --- src/pycram/resolver/location/database_location.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pycram/resolver/location/database_location.py b/src/pycram/resolver/location/database_location.py index d613b99a3..c0427de82 100644 --- a/src/pycram/resolver/location/database_location.py +++ b/src/pycram/resolver/location/database_location.py @@ -45,12 +45,12 @@ def create_query_from_occupancy_costmap(self) -> Select: # query all relative robot positions in regard to an objects position # make sure to order the joins() correctly - query = (select(PickUpAction.arm, PickUpAction.grasp, RobotState.torso_height, Position.x, Position.y) + query = (select(PickUpAction.arm, PickUpAction.grasp, RobotState.torso_height, robot_pos.x, robot_pos.y) .join(TaskTreeNode.code) .join(Code.designator.of_type(PickUpAction)) .join(PickUpAction.robot_state) .join(RobotState.pose) - .join(orm.base.Pose.position) + .join(robot_pos) .join(PickUpAction.object).where(Object.type == self.target.type) .where(TaskTreeNode.status == "SUCCEEDED"))