auto_reset_slam.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 # automatically reset slam as robot put on the ground
00004 
00005 import rospy
00006 from std_msgs.msg import Empty
00007 import subprocess
00008 
00009 def callback(msg):
00010     rospy.loginfo("Killing /gmapping_node")
00011     subprocess.check_call(["rosnode", "kill", "/gmapping_node"])
00012 
00013 if __name__ == "__main__":
00014     rospy.init_node("auto_reset_slam")
00015     sub = rospy.Subscriber("/odom_init_trigger", Empty, callback)
00016     rospy.spin()


jsk_robot_startup
Author(s):
autogenerated on Wed Sep 16 2015 10:31:26