From 66b217efddf8ad8a2a8e4cd2384d2d994155cd7b Mon Sep 17 00:00:00 2001 From: Ryuichi Ueda Date: Mon, 30 May 2016 00:01:21 +0000 Subject: [PATCH] Fix a bug --- scripts/rtlightsensors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/rtlightsensors.py b/scripts/rtlightsensors.py index 9df0a78..dee2fe8 100755 --- a/scripts/rtlightsensors.py +++ b/scripts/rtlightsensors.py @@ -18,10 +18,11 @@ def talker(): d.left_side = int(data[2]) d.left_forward = int(data[3]) pub.publish(d) - rate.sleep() except: rospy.logerr("cannot open " + devfile) + rate.sleep() + if __name__ == '__main__': try: talker()