@@ -0,0 +1,986 @@
+#!/usr/bin/env python%0Aimport rospy%0Afrom sensor_msgs.msg import LaserScan%0Aimport math%0A%0Adef callback(data):%0A#Option 1) Conform data to specified input/output ranges%0A    #data.ranges  = %5Bdata.range_max if range_val%3Edata.range_max else (data.range_min if range_val%3Cdata.range_min else range_val) for range_val in data.ranges%5D%0A    data.ranges  = %5Bdata.range_max if range_val%3Edata.range_max else (0.0 if range_val%3Cdata.range_min else range_val) for range_val in data.ranges%5D%0A#Option 2) Conform input/output ranges to data%0A    data.range_max = max(data.range_max,max(data.ranges))%0A    data.range_min = min(data.range_min,min(data.ranges))%0A    pub.publish(data)%0A%0A# Intializes everything%0Adef start():%0A    rospy.init_node('laser_filter')%0A    scan_topic = rospy.get_param('~scan_topic', 'scan')%0A    global pub%0A    pub = rospy.Publisher(scan_topic+'_filtered', LaserScan, queue_size=10)%0A    rospy.Subscriber(scan_topic, LaserScan, callback)%0A    rospy.spin()%0A%0Aif __name__ == '__main__':%0A    start()%0A

Add laster filter for adjusting laser scanner data on the fly.