osrf / rosbook

Example code to accompany the book Programming Robots with ROS
Apache License 2.0
477 stars 238 forks source link

Can't run basics topic publisher. #41

Closed bpinaya closed 6 years ago

bpinaya commented 6 years ago

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)