Trouble subscribing to turtlesim color sensor in a rostest
def callback(data):
self.fail(data.data)
x = rospy.Subscriber("/turtlesim/turtle1/color_sensor",Color, callback)
rospy.spin()
Hi, The topic is subscribe and published but i can manage to display the content, if you have any idea thanks.I am using rostest and the master server is different than with roslaunch. (conflit or setup to do?). it's never leave the rospy.spin()
thanks for your answer, the topic is good. When it subscribe I get this so it should be okay. But the callback is never call. I think rostest is doing something i don't get. I run the same in listener.py(from tutorial) and it's work.
rostopic info /turtlesim/turtle1/color_sensor
Type: turtlesim/Color
Publishers: * /turtlesim/turtlesim_node (http://jsf-p-desktop:55631/)
Subscribers: * /turtlesim_move_test (http://jsf-p-desktop:34016/)
okey , i checked the hztest.py and they use:
sub = rospy.Subscriber(topic, rospy.AnyMsg, self.callback)
should I look for the use of self?
Regards