]> defiant.homedns.org Git - ros_roboint.git/commitdiff
robo_explorer: only publish scan if enabled
authorErik Andresen <erik@vontaene.de>
Wed, 4 Sep 2013 12:37:50 +0000 (14:37 +0200)
committerErik Andresen <erik@vontaene.de>
Wed, 4 Sep 2013 12:37:50 +0000 (14:37 +0200)
scripts/robo_explorer.py

index 039fbd41e0cd670279860468e8d7fa0150455e62..e0da2ac9c6b3fe84ac68b34653077f17b45fd6bc 100755 (executable)
@@ -32,7 +32,8 @@ class RoboExplorer:
                self.wheel_size = float(rospy.get_param('~wheel_size', "0.0255"))
 
                self.pub_motor = rospy.Publisher("ft/set_motor", Motor)
-               self.pub_scan = rospy.Publisher("scan", LaserScan)
+               if self.enable_ultrasonic_laser:
+                       self.pub_scan = rospy.Publisher("scan", LaserScan)
                self.pub_odom = rospy.Publisher("odom", Odometry)
                
                rospy.Subscriber("cmd_vel", Twist, self.cmdVelReceived)