From b5cc301c5444155a14dec8c03a49fdfa87f299ee Mon Sep 17 00:00:00 2001 From: Binit Shah Date: Fri, 15 Sep 2023 03:18:22 -0400 Subject: [PATCH] Surface scanning working well --- hello_helpers/src/hello_helpers/hello_misc.py | 2 +- stretch_demos/empty_pc.pkl | Bin 0 -> 280 bytes stretch_demos/nodes/grasp_object | 29 +++++++++++++----- 3 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 stretch_demos/empty_pc.pkl diff --git a/hello_helpers/src/hello_helpers/hello_misc.py b/hello_helpers/src/hello_helpers/hello_misc.py index bbbf7fd..540c574 100644 --- a/hello_helpers/src/hello_helpers/hello_misc.py +++ b/hello_helpers/src/hello_helpers/hello_misc.py @@ -178,7 +178,7 @@ class HelloNode: continue rate.sleep() - def get_point_cloud(): + def get_point_cloud(self): assert(self._point_cloud is not None) return self._point_cloud diff --git a/stretch_demos/empty_pc.pkl b/stretch_demos/empty_pc.pkl new file mode 100644 index 0000000000000000000000000000000000000000..8b6b9760c544108f1a9466065c662aaeff3c5665 GIT binary patch literal 280 zcmZo*oyyC|00uoW#i@D4`9<-$#p%U*KteA*AU`vpIwG{tC24>vMz@)XU+DX~*D zdPIs#Qjm0bq$Z}M7ES44gEC<1yg7S#i}H&LD)oS5NoH>9lpdB45Cv175Dv_=9>$6(-VEOC-i)b98NyJf fGFDFUW self.surface_search_timeout: + image_copy = self.manip.max_height_im.image.copy() + image_copy[surface_mask <= 0] = 0 + surface_pc = self.manip.max_height_im.to_point_cloud(substitute_image=image_copy) + self.surface_marker_pub.publish(surface_pc) + else: + self.surface_marker_pub.publish(self.empty_pc) + self.surface_search_timeout = time.time() + 3.0 self.manip.publish_visualizations(self.voi_marker_pub, self.mhi_marker_pub)