]> defiant.homedns.org Git - ros_roboint.git/blobdiff - scripts/robo_explorer.py
robo_explorer: only publish scan if enabled
[ros_roboint.git] / 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)