def __init__(self,bool_direction):
print "Beginning wall follow"
#setup the node
rospy.init_node('wall_follower', anonymous=False)
rospy.on_shutdown(self.shutdown)
self.right = bool_direction
# node specific topics (remap on command line or in launch file)
self.drive = rospy.Publisher('/vesc/ackermann_cmd_mux/input/navigation', AckermannDriveStamped, queue_size=5)
#sets the subscriber
rospy.Subscriber('scan', LaserScan, self.laserCall)
rospy.Subscriber('blob_info', blob_detect,self.blobCall)
rospy.spin()
# always make sure to leave the robot stopped
self.drive.publish(AckermannDriveStamped())
评论列表
文章目录