From 6668166c0d628b03914d57e78de0646fb8176490 Mon Sep 17 00:00:00 2001 From: Erik Andresen Date: Wed, 4 Sep 2013 14:37:50 +0200 Subject: [PATCH] robo_explorer: only publish scan if enabled --- scripts/robo_explorer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/robo_explorer.py b/scripts/robo_explorer.py index 039fbd4..e0da2ac 100755 --- a/scripts/robo_explorer.py +++ b/scripts/robo_explorer.py @@ -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) -- 2.39.5