diff --git a/demos/baxtergv6_apc2016/node_scripts/work_order_publisher.py b/demos/baxtergv6_apc2016/node_scripts/work_order_publisher.py index 5b21f37d7..1e96c9685 100755 --- a/demos/baxtergv6_apc2016/node_scripts/work_order_publisher.py +++ b/demos/baxtergv6_apc2016/node_scripts/work_order_publisher.py @@ -117,6 +117,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() diff --git a/jsk_2016_01_baxter_apc/node_scripts/output_json_pick.py b/jsk_2016_01_baxter_apc/node_scripts/output_json_pick.py index 3fc073aa0..8dbbae5a3 100755 --- a/jsk_2016_01_baxter_apc/node_scripts/output_json_pick.py +++ b/jsk_2016_01_baxter_apc/node_scripts/output_json_pick.py @@ -70,6 +70,7 @@ def update_data(self): is_updated = True return is_updated + if __name__ == '__main__': rospy.init_node('output_json_pick') ojp = OutputJsonPick() diff --git a/jsk_2016_01_baxter_apc/node_scripts/output_json_stow.py b/jsk_2016_01_baxter_apc/node_scripts/output_json_stow.py index f3d960640..7edbc96d6 100755 --- a/jsk_2016_01_baxter_apc/node_scripts/output_json_stow.py +++ b/jsk_2016_01_baxter_apc/node_scripts/output_json_stow.py @@ -82,6 +82,7 @@ def update_data(self): is_updated = True return is_updated + if __name__ == '__main__': rospy.init_node('output_json_stow') ojs = OutputJsonStow() diff --git a/jsk_apc2016_common/node_scripts/publish_bin_tf.py b/jsk_apc2016_common/node_scripts/publish_bin_tf.py index 830896a3a..72e495d34 100755 --- a/jsk_apc2016_common/node_scripts/publish_bin_tf.py +++ b/jsk_apc2016_common/node_scripts/publish_bin_tf.py @@ -52,6 +52,7 @@ def bin_info_array_to_bbox_dict(self, bin_info_array): bbox_dict[bin_.name] = bin_.bbox return bbox_dict + if __name__ == '__main__': rospy.init_node('sib_publish_tf') pub_tf = PublishTF() diff --git a/jsk_apc2016_common/node_scripts/tf_bbox_to_mask.py b/jsk_apc2016_common/node_scripts/tf_bbox_to_mask.py index 49dc5176c..1676d0f6b 100755 --- a/jsk_apc2016_common/node_scripts/tf_bbox_to_mask.py +++ b/jsk_apc2016_common/node_scripts/tf_bbox_to_mask.py @@ -136,6 +136,7 @@ def project_points(self, points, camera_model): [point.point.x, point.point.y, point.point.z])) return projected_points + if __name__ == '__main__': rospy.init_node('tf_bbox_to_mask') tfmask = TFBboxToMask() diff --git a/jsk_apc2016_common/scripts/generate_interface_json.py b/jsk_apc2016_common/scripts/generate_interface_json.py index 0f59e938d..0402afa37 100755 --- a/jsk_apc2016_common/scripts/generate_interface_json.py +++ b/jsk_apc2016_common/scripts/generate_interface_json.py @@ -164,6 +164,7 @@ def generateBinContents(): return bin_contents + # Do the work for the picking task # ------------------------------------------------------------------------------ # Generate bin contents for the pick pod diff --git a/jsk_arc2017_common/node_scripts/candidates_publisher.py b/jsk_arc2017_common/node_scripts/candidates_publisher.py index a69907bb6..d892f9d1e 100755 --- a/jsk_arc2017_common/node_scripts/candidates_publisher.py +++ b/jsk_arc2017_common/node_scripts/candidates_publisher.py @@ -63,8 +63,8 @@ def _timer_cb(self, event): contents = tote_contents else: return - candidates_fixed = [l for l in self.label_names - if l.startswith('__')] + candidates_fixed = [ln for ln in self.label_names + if ln.startswith('__')] candidates = candidates_fixed + contents label_list = [self.label_names.index(x) for x in candidates] label_list = sorted(label_list) @@ -79,6 +79,7 @@ def _timer_cb(self, event): msg.header.stamp = rospy.Time.now() self.pub.publish(msg) + if __name__ == '__main__': rospy.init_node('candidates_publisher') candidates_publisher = CandidatesPublisher() diff --git a/jsk_arc2017_common/node_scripts/grasp_style_server.py b/jsk_arc2017_common/node_scripts/grasp_style_server.py index 86ad8236f..89cd12e7d 100755 --- a/jsk_arc2017_common/node_scripts/grasp_style_server.py +++ b/jsk_arc2017_common/node_scripts/grasp_style_server.py @@ -48,6 +48,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/jsk_arc2017_common/node_scripts/work_order_publisher.py b/jsk_arc2017_common/node_scripts/work_order_publisher.py index 498678ab4..35f336ef8 100755 --- a/jsk_arc2017_common/node_scripts/work_order_publisher.py +++ b/jsk_arc2017_common/node_scripts/work_order_publisher.py @@ -116,6 +116,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() diff --git a/jsk_arc2017_common/python/jsk_arc2017_common/data.py b/jsk_arc2017_common/python/jsk_arc2017_common/data.py index 0913a2c4b..a572fea35 100644 --- a/jsk_arc2017_common/python/jsk_arc2017_common/data.py +++ b/jsk_arc2017_common/python/jsk_arc2017_common/data.py @@ -21,7 +21,7 @@ def get_label_names(): def get_object_names(): label_names = get_label_names() - return [l for l in label_names if not l.startswith('__')] + return [ln for ln in label_names if not ln.startswith('__')] def get_known_object_names():