After creating a package name basics (with rospy, roscpp, std_msgs) and added the src, sourced, launched a roscore and tried to run the topic_publisher this was the output:
I assume there needs to be a queue size? That is not explained in the book or in the code.
rosrun basics topic_publisher.py
/home/bpinaya/tmp_ws/src/basics/src/topic_publisher.py:19: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
pub = rospy.Publisher('counter', Int32)
After creating a package name basics (with rospy, roscpp, std_msgs) and added the src, sourced, launched a roscore and tried to run the topic_publisher this was the output: I assume there needs to be a queue size? That is not explained in the book or in the code.