Skip to content

Commit

Permalink
test_rospy: added queue_size arguments to Publishers to avoid warnings (
Browse files Browse the repository at this point in the history
ros#1615)

* /test_rospy/talker: set publishers queue_size to supress warning

* test_rospy: added missing queue_size paramters in Publishers to avoid warnings
  • Loading branch information
cwecht authored and tahsinkose committed Apr 15, 2019
1 parent f86ba17 commit 0dc72d1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/test_rospy/nodes/listenerpublisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def start_publishing():
if _pub is not None:
return
print("registering onto listenerpublisher")
_pub = rospy.Publisher("listenerpublisher", String)
_pub = rospy.Publisher("listenerpublisher", String, queue_size=0)

def callback(data):
print(rospy.get_caller_id(), "I heard %s"%data.data)
Expand Down
2 changes: 1 addition & 1 deletion test/test_rospy/nodes/listenerpublisher_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def start_publishing():
if _pub is not None:
return
print("registering onto listenerpublisher")
_pub = rospy.Publisher("listenerpublisher", EmbedTest)
_pub = rospy.Publisher("listenerpublisher", EmbedTest, queue_size=0)

def callback(data):
print(rospy.get_caller_id(), "I heard %s, %s, %s"%(data.str1.data, data.int1.data, data.val.val))
Expand Down
2 changes: 1 addition & 1 deletion test/test_rospy/nodes/publish_on_shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def talker_shutdown():

def talker():
global pub
pub = rospy.Publisher('chatter', String)
pub = rospy.Publisher('chatter', String, queue_size=0)
rospy.init_node('talker', anonymous=True)

# register talker_shutdown() to be called when rospy exits
Expand Down
2 changes: 1 addition & 1 deletion test/test_rospy/nodes/talker.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

def talker():
# create our publish handle
pub = rospy.Publisher('chatter', String)
pub = rospy.Publisher('chatter', String, queue_size=0)

# in ROS, nodes are unique named. If two nodes with the same
# node are launched, the previous one is kicked off. The
Expand Down
8 changes: 4 additions & 4 deletions test/test_rospy/test/rostest/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ def chained_callback(data):

def test_node():
# required publications
string_out = rospy.Publisher("test_string_out", test_rosmaster.msg.TestString)
primitives_out = rospy.Publisher("test_primitives_out", test_rosmaster.msg.TestPrimitives)
arrays_out = rospy.Publisher("test_arrays_out", test_rosmaster.msg.TestArrays)
header_out = rospy.Publisher("test_header_out", test_rosmaster.msg.TestHeader)
string_out = rospy.Publisher("test_string_out", test_rosmaster.msg.TestString, queue_size=0)
primitives_out = rospy.Publisher("test_primitives_out", test_rosmaster.msg.TestPrimitives, queue_size=0)
arrays_out = rospy.Publisher("test_arrays_out", test_rosmaster.msg.TestArrays, queue_size=0)
header_out = rospy.Publisher("test_header_out", test_rosmaster.msg.TestHeader, queue_size=0)

#required subs
rospy.Subscriber("test_string_in", test_rosmaster.msg.TestString, chain_callback(string_out))
Expand Down

0 comments on commit 0dc72d1

Please sign in to comment.