#!/usr/bin/env python

from sjd227_hw1.srv import *
from sjd227_hw1.msg import *
from std_msgs.msg import String
import rospy
import sys

def callback(data):
	rospy.loginfo('Command = %s',data.data)

def controller():
	print("hi")
	rospy.loginfo('hi there')
	rospy.wait_for_service('move_robot')

	rospy.init_node('controller', anonymous=True)

	rospy.Subscriber("command", String, callback)

	# spin() simply keeps python from exiting until this node is stopped
	rospy.spin()

if __name__ == "__main__":
	controller()
