How to subscribe to Nao tactile sensor? [closed]
Below are the codes for my listener node. What am I missing? The output doesn't show anything.
#!/usr/bin/env python
import rospy
from std_msgs.msg import String
def callback(data):
rospy.loginfo(rospy.get_name()+ ": I heard %s" % data.data)
def tactilelistener():
rospy.init_node('tactilelistener', anonymous=True)
rospy.Subscriber("tactile_touch", String, callback)
rospy.spin()
if __name__== '__main__':
tactilelistener()