print works but rospy.loginfo doesn't
Hi,
I have this code and print would work but rospy.loginfo
import rospy
from std_msgs.msg import String
messageToRos = Queue.Queue()
def writeMessageToRos(messageToRos):
pub = rospy.Publisher('chatter', String, queue_size=10)
rate = rospy.Rate(10) # 10hz
while not rospy.is_shutdown():
msg = messageToRos.get()
print 'new messageToRos: ', msg
rospy.loginfo('new messageToRos: ', msg)
pub.publish(msg)
rate.sleep()
even the publisher works fine. How would I correctly do a loginfo or debuginfo for msg ?
Are you running this from
rosrun
orroslaunch
?