From dc41c6a9dab771e529f192a3a4a409caef10b880 Mon Sep 17 00:00:00 2001 From: Shun Hasegawa Date: Tue, 29 Aug 2023 19:14:59 +0900 Subject: [PATCH] Fix for noetic linter --- .../node_scripts/mask_rcnn_instance_segmentation.py | 4 ++-- .../nodes/grasp_style_server_book_picking.py | 1 + .../nodes/work_order_publisher_book_picking.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/demos/grasp_fusion/ros/grasp_fusion/node_scripts/mask_rcnn_instance_segmentation.py b/demos/grasp_fusion/ros/grasp_fusion/node_scripts/mask_rcnn_instance_segmentation.py index 08df2a87d..8a4af5529 100644 --- a/demos/grasp_fusion/ros/grasp_fusion/node_scripts/mask_rcnn_instance_segmentation.py +++ b/demos/grasp_fusion/ros/grasp_fusion/node_scripts/mask_rcnn_instance_segmentation.py @@ -145,8 +145,8 @@ def callback(self, imgmsg): if self.pub_viz.get_num_connections() > 0: n_fg_class = len(self.fg_class_names) - captions = ['{:d}: {:s}'.format(l, self.fg_class_names[l]) - for l in labels] + captions = ['{:d}: {:s}'.format(lbl, self.fg_class_names[lbl]) + for lbl in labels] viz = chainer_mask_rcnn.utils.draw_instance_bboxes( img, bboxes, labels + 1, n_class=n_fg_class + 1, masks=masks, captions=captions) diff --git a/demos/grasp_prediction_arc2017/ros/grasp_prediction_arc2017/nodes/grasp_style_server_book_picking.py b/demos/grasp_prediction_arc2017/ros/grasp_prediction_arc2017/nodes/grasp_style_server_book_picking.py index fe6a245fa..1f532fa8c 100644 --- a/demos/grasp_prediction_arc2017/ros/grasp_prediction_arc2017/nodes/grasp_style_server_book_picking.py +++ b/demos/grasp_prediction_arc2017/ros/grasp_prediction_arc2017/nodes/grasp_style_server_book_picking.py @@ -49,6 +49,7 @@ def _get_grasp_style(self, req): res.success = True return res + if __name__ == "__main__": rospy.init_node('grasp_style_server') server = GraspStyleServer() diff --git a/demos/grasp_prediction_arc2017/ros/grasp_prediction_arc2017/nodes/work_order_publisher_book_picking.py b/demos/grasp_prediction_arc2017/ros/grasp_prediction_arc2017/nodes/work_order_publisher_book_picking.py index 78f28a3c3..fd290e0de 100644 --- a/demos/grasp_prediction_arc2017/ros/grasp_prediction_arc2017/nodes/work_order_publisher_book_picking.py +++ b/demos/grasp_prediction_arc2017/ros/grasp_prediction_arc2017/nodes/work_order_publisher_book_picking.py @@ -119,6 +119,7 @@ def _publish_msg(self, event): self.larm_pub.publish(self.larm_msg) self.rarm_pub.publish(self.rarm_msg) + if __name__ == '__main__': rospy.init_node('work_order_publisher') work_order_publisher = WorkOrderPublisher()