ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

rosrun rosserial_python /dev/ttyACM0 error occured TypeError: __init__() got an unexpected keyword argument 'queue_size'

asked 2015-11-10 10:31:44 -0600

Gure Ling gravatar image

updated 2015-11-10 13:45:30 -0600

gvdhoorn gravatar image

Hi, I'm following rosserial_arduino/Tutorials/Hello World and when runing rosserial_python using rosrun rosserial_python /dev/ttyACM0 then got problems

ling@ubuntu12:~/catkin_ws$ rosrun rosserial_python /dev/ttyACM0
[INFO] [WallTime: 1447168684.001756] ROS Serial Python Node
[INFO] [WallTime: 1447168684.011288] Connecting to /dev/ttyACM0 at 57600 baud
Traceback (most recent call last):
  File "/home/ling/catkin_ws/src/rosserial/rosserial_python/nodes/", line 80, in <module>
    client = SerialClient(port_name, baud)
  File "/home/ling/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/", line 333, in __init__
    self.pub_diagnostics = rospy.Publisher('/diagnostics', diagnostic_msgs.msg.DiagnosticArray, queue_size=10)
TypeError: __init__() got an unexpected keyword argument 'queue_size'

I tried to ignored the error and start the next step

ling@ubuntu12:~/catkin_ws$ rostopic echo chatter

It wouldn't work as I thought:

WARNING: topic [/chatter] does not appear to be published yet

I'm using groovy on ubuntu12 but my arduino IDE is installed on Win7. Does it matter?

Can someone help? Thanks advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-10 14:41:09 -0600

ahendrix gravatar image

This looks like a mismatch between your version of ROS and the version of rosserial that you're using.

The queue_size option was added to rospy in ROS Hydro, and it seems like you're running an earlier version of ROS.

You should check out the branch of rosserial for the version of ROS that you're using; for example if you're using ROS Groovy, you should check out the groovy-devel branch of rosserial.

edit flag offensive delete link more


Yes I think you are right. I've tried that wiki on Indigo and worked fine. Thank you very much.

Gure Ling gravatar image Gure Ling  ( 2015-11-11 04:51:05 -0600 )edit

Question Tools

1 follower


Asked: 2015-11-10 10:31:44 -0600

Seen: 514 times

Last updated: Nov 10 '15