From 8501b2351ac81f98d8be77a3ce5636881d4305a0 Mon Sep 17 00:00:00 2001 From: Igor Maurell Date: Fri, 16 Jun 2023 15:22:30 -0300 Subject: [PATCH 01/11] using new butia_vision_msgs --- butia_vision_msgs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/butia_vision_msgs b/butia_vision_msgs index 6c11ce27..928ee0b6 160000 --- a/butia_vision_msgs +++ b/butia_vision_msgs @@ -1 +1 @@ -Subproject commit 6c11ce271697e1ee09ac418879e8a6586ca4c792 +Subproject commit 928ee0b67292575fdef8bcb6feb78567474b7356 From 49cf28a16f2037fd5530e8f939acde36aef0257c Mon Sep 17 00:00:00 2001 From: Igor Maurell Date: Fri, 16 Jun 2023 17:12:23 -0300 Subject: [PATCH 02/11] updating butia_vision_msgs version --- butia_vision_msgs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/butia_vision_msgs b/butia_vision_msgs index 928ee0b6..17810ba7 160000 --- a/butia_vision_msgs +++ b/butia_vision_msgs @@ -1 +1 @@ -Subproject commit 928ee0b67292575fdef8bcb6feb78567474b7356 +Subproject commit 17810ba7d8490cd47e345a12cd6b947f4d0c85d3 From caaf08d3e9de3bc00b8eeef148f0e921eef42840 Mon Sep 17 00:00:00 2001 From: Igor Maurell Date: Thu, 22 Jun 2023 22:04:53 -0300 Subject: [PATCH 03/11] adding a parameter to fit a better bbox --- .../image2world/image2world.py | 27 +++++++++++++++---- .../launch/butia_vision_bridge.launch | 2 +- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/butia_image2world/scripts/butia_image2world/image2world/image2world.py b/butia_image2world/scripts/butia_image2world/image2world/image2world.py index 03854d88..ab7c39b5 100755 --- a/butia_image2world/scripts/butia_image2world/image2world/image2world.py +++ b/butia_image2world/scripts/butia_image2world/image2world/image2world.py @@ -218,18 +218,17 @@ def __detectionDescriptionProcessing(self, data, description2d, header): bbox_limits[2] = bbox_limits[2] if bbox_limits[2] < w else w-1 bbox_limits[3] = bbox_limits[3] if bbox_limits[3] < h else h-1 - self.__mountLutTable(camera_info) + self.__mountLutTable(camera_info) center_depth = image_depth[int(center_y), int(center_x)] - if center_depth == 0: + if center_depth <= 0: rospy.logwarn('INVALID DEPTH VALUE') center_depth/= 1000. limits = np.asarray([(bbox_limits[0], bbox_limits[2]), (bbox_limits[1], bbox_limits[3])]) - vertices_3d = np.zeros((len(limits), 3)) vertices_3d[:, :2] = self.lut_table[limits[:, 1], limits[:, 0], :]*center_depth @@ -266,7 +265,24 @@ def __detectionDescriptionProcessing(self, data, description2d, header): min_bound = np.min(vertices_3d, axis=0) max_bound = np.max(vertices_3d, axis=0) - box = o3d.geometry.AxisAlignedBoundingBox(min_bound, max_bound) + if self.fit_bbox: + box_depths = image_depth[limits[0, 1]:limits[1, 1], limits[0, 0]:limits[1, 0]]/1000. + box_lut = self.lut_table[limits[0, 1]:limits[1, 1], limits[0, 0]:limits[1, 0], :] + + box_points = np.zeros((box_depths.size, 3)) + + box_points[:, 0] = box_lut[:, :, 0].flatten()*box_depths.flatten() + box_points[:, 1] = box_lut[:, :, 1].flatten()*box_depths.flatten() + box_points[:, 2] = box_depths.flatten() + + box_points = box_points[box_points[:, 2] > 0] + box_points = box_points[np.logical_and(np.all(box_points > min_bound, axis=1), + np.all(box_points < max_bound, axis=1))] + + box = o3d.geometry.AxisAlignedBoundingBox().create_from_points(o3d.utility.Vector3dVector(box_points)) + + else: + box = o3d.geometry.AxisAlignedBoundingBox(min_bound, max_bound) #TODO: ''' @@ -397,7 +413,8 @@ def __readParameters(self): self.publish_debug = rospy.get_param('~publish_debug', False) self.publish_markers = rospy.get_param('~publish_markers', True) self.color = rospy.get_param('~color', [255, 0, 0]) - self.depth_mean_error = rospy.get_param('~depth_mean_error', 0.017) + self.depth_mean_error = rospy.get_param('~depth_mean_error', 0.05) + self.fit_bbox = rospy.get_param('~fit_bbox', False) if __name__ == '__main__': rospy.init_node('image2world_node', anonymous = True) diff --git a/butia_vision_bridge/launch/butia_vision_bridge.launch b/butia_vision_bridge/launch/butia_vision_bridge.launch index 7b1bd8a6..b5b0170e 100644 --- a/butia_vision_bridge/launch/butia_vision_bridge.launch +++ b/butia_vision_bridge/launch/butia_vision_bridge.launch @@ -58,7 +58,7 @@ - + From 9de91322aef64151644630886a04e6e70f2df49b Mon Sep 17 00:00:00 2001 From: Igor Maurell Date: Sun, 2 Jul 2023 23:54:48 -0300 Subject: [PATCH 04/11] fixing a bug in image2world --- .../scripts/butia_image2world/image2world/image2world.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/butia_image2world/scripts/butia_image2world/image2world/image2world.py b/butia_image2world/scripts/butia_image2world/image2world/image2world.py index ab7c39b5..c29d6277 100755 --- a/butia_image2world/scripts/butia_image2world/image2world/image2world.py +++ b/butia_image2world/scripts/butia_image2world/image2world/image2world.py @@ -136,8 +136,8 @@ def __detectionDescriptionProcessing(self, data, description2d, header): w, h, _ = array_point_cloud.shape bbox_limits[0] = bbox_limits[0] if bbox_limits[0] > 0 else 0 - bbox_limits[1] = bbox_limits[1] if bbox_limits[1] > 0 else 0 - bbox_limits[2] = bbox_limits[2] if bbox_limits[2] < w else w-1 + bbox_limits[1] = bbox_limits[1] if bbox_limits[1] < w else w-1 + bbox_limits[2] = bbox_limits[2] if bbox_limits[2] > 0 else 0 bbox_limits[3] = bbox_limits[3] if bbox_limits[3] < h else h-1 desc_point_cloud = array_point_cloud[bbox_limits[2]:bbox_limits[3], bbox_limits[0]:bbox_limits[1], :] @@ -214,8 +214,8 @@ def __detectionDescriptionProcessing(self, data, description2d, header): h, w = image_depth.shape bbox_limits[0] = bbox_limits[0] if bbox_limits[0] > 0 else 0 - bbox_limits[1] = bbox_limits[1] if bbox_limits[1] > 0 else 0 - bbox_limits[2] = bbox_limits[2] if bbox_limits[2] < w else w-1 + bbox_limits[1] = bbox_limits[1] if bbox_limits[1] < w else w-1 + bbox_limits[2] = bbox_limits[2] if bbox_limits[2] > 0 else 0 bbox_limits[3] = bbox_limits[3] if bbox_limits[3] < h else h-1 self.__mountLutTable(camera_info) From 58c7ab4c90af1b3fcdee90aa717b6309a2adffa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Milczarek?= Date: Mon, 3 Jul 2023 05:24:32 +0200 Subject: [PATCH 05/11] changed submodule HEAD --- butia_vision_bridge/launch/butia_vision_bridge.launch | 2 +- butia_vision_msgs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/butia_vision_bridge/launch/butia_vision_bridge.launch b/butia_vision_bridge/launch/butia_vision_bridge.launch index 7b1bd8a6..b5b0170e 100644 --- a/butia_vision_bridge/launch/butia_vision_bridge.launch +++ b/butia_vision_bridge/launch/butia_vision_bridge.launch @@ -58,7 +58,7 @@ - + diff --git a/butia_vision_msgs b/butia_vision_msgs index 8800c69a..1737ac71 160000 --- a/butia_vision_msgs +++ b/butia_vision_msgs @@ -1 +1 @@ -Subproject commit 8800c69aad4edb701136adcfe29162b38cc9a34e +Subproject commit 1737ac710f14f512b38a5183d8593005e20b9104 From f5dc50a13d4d2298045d790cad6d8395d1c112a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Milczarek?= Date: Mon, 3 Jul 2023 05:25:19 +0200 Subject: [PATCH 06/11] changed submodule HEAD --- butia_vision_msgs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/butia_vision_msgs b/butia_vision_msgs index 17810ba7..1737ac71 160000 --- a/butia_vision_msgs +++ b/butia_vision_msgs @@ -1 +1 @@ -Subproject commit 17810ba7d8490cd47e345a12cd6b947f4d0c85d3 +Subproject commit 1737ac710f14f512b38a5183d8593005e20b9104 From 21de53dfdcab50dbd2d057dd5f0d85837a7aa6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Milczarek?= Date: Mon, 3 Jul 2023 05:40:49 +0200 Subject: [PATCH 07/11] added bbox2D to description3D --- .../scripts/butia_image2world/image2world/image2world.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/butia_image2world/scripts/butia_image2world/image2world/image2world.py b/butia_image2world/scripts/butia_image2world/image2world/image2world.py index cddb8837..36700dc8 100755 --- a/butia_image2world/scripts/butia_image2world/image2world/image2world.py +++ b/butia_image2world/scripts/butia_image2world/image2world/image2world.py @@ -320,9 +320,11 @@ def __poseDescriptionProcessing(self, data, description2d : Description2D, heade return description3d - def __createDescription3D(self, source_data, description2d, header): + def __createDescription3D(self, source_data, description2d : Description2D, header): if description2d.type in self.DESCRIPTION_PROCESSING_ALGORITHMS: - return self.DESCRIPTION_PROCESSING_ALGORITHMS[description2d.type](source_data, description2d, header) + description3D : Description3D = self.DESCRIPTION_PROCESSING_ALGORITHMS[description2d.type](source_data, description2d, header) + description3D.bbox2D = description2d.bbox + return description3D else: return None From a286b6b8dfd2c03ef5650808d90d4bea794654f9 Mon Sep 17 00:00:00 2001 From: Igor Maurell Date: Mon, 3 Jul 2023 19:15:42 -0300 Subject: [PATCH 08/11] removing realsense filters --- butia_vision_bridge/launch/butia_vision_bridge.launch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/butia_vision_bridge/launch/butia_vision_bridge.launch b/butia_vision_bridge/launch/butia_vision_bridge.launch index b5b0170e..7b1bd8a6 100644 --- a/butia_vision_bridge/launch/butia_vision_bridge.launch +++ b/butia_vision_bridge/launch/butia_vision_bridge.launch @@ -58,7 +58,7 @@ - + From 57284b225a217ad7d1da06f2342e9a62a02f9eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Milczarek?= Date: Tue, 4 Jul 2023 00:19:17 +0200 Subject: [PATCH 09/11] removed redundant args --- butia_vision_launchfiles/yolo_tracker_recognition.launch | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/butia_vision_launchfiles/yolo_tracker_recognition.launch b/butia_vision_launchfiles/yolo_tracker_recognition.launch index 21fff069..f3da9894 100644 --- a/butia_vision_launchfiles/yolo_tracker_recognition.launch +++ b/butia_vision_launchfiles/yolo_tracker_recognition.launch @@ -11,12 +11,10 @@ - - - + From 36d0615418a2b26a26a5286d934f7d063013a85e Mon Sep 17 00:00:00 2001 From: "jardel.dyonisio@hotmail.com" Date: Mon, 3 Jul 2023 19:23:22 -0300 Subject: [PATCH 10/11] removed some filters --- butia_recognition/include/yolov5 | 2 +- butia_vision_bridge/launch/butia_vision_bridge.launch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/butia_recognition/include/yolov5 b/butia_recognition/include/yolov5 index d3ea0df8..956be8e6 160000 --- a/butia_recognition/include/yolov5 +++ b/butia_recognition/include/yolov5 @@ -1 +1 @@ -Subproject commit d3ea0df8b9f923685ce5f2555c303b8eddbf83fd +Subproject commit 956be8e642b5c10af4a1533e09084ca32ff4f21f diff --git a/butia_vision_bridge/launch/butia_vision_bridge.launch b/butia_vision_bridge/launch/butia_vision_bridge.launch index b5b0170e..7b1bd8a6 100644 --- a/butia_vision_bridge/launch/butia_vision_bridge.launch +++ b/butia_vision_bridge/launch/butia_vision_bridge.launch @@ -58,7 +58,7 @@ - + From 8ffea965c2706d95335022ed86a5cfc4c496224f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Milczarek?= Date: Tue, 4 Jul 2023 09:16:03 +0200 Subject: [PATCH 11/11] changed defaults vision messages --- butia_recognition/include/yolov5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/butia_recognition/include/yolov5 b/butia_recognition/include/yolov5 index 956be8e6..d3ea0df8 160000 --- a/butia_recognition/include/yolov5 +++ b/butia_recognition/include/yolov5 @@ -1 +1 @@ -Subproject commit 956be8e642b5c10af4a1533e09084ca32ff4f21f +Subproject commit d3ea0df8b9f923685ce5f2555c303b8eddbf83fd