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

Rosbridge TCP Error: __init__() got an unexpected keyword argument 'parameters'

asked 2013-12-15 08:41:29 -0600

mozcelikors gravatar image

Hello,

I need to use rosbridge tcp in order to communicate with MATLAB through TCP. I've succesfully installed rosbridge tcp (groovy-devel). When I run rosbridge tcp, it says that port 9090 is open for communication and when I send data from the following this matlab script

echotcpip('on',9090)
t = tcpip('localhost',9090);
fopen(t)
JSON_MSG = '{ "op": "publish",  
             "topic": "/gz/cmd_vel", 
             "msg":"{ "linear": "{x : 0.8, y:0.2, z:0.3}", 
             "angular": "{x : 0, y:0, z:0}" }"
            }';
fwrite(t,JSON_MSG)
fclose(t)
echotcpip('off')

I get error on the rosbridge tcp server:

[ERROR] [WallTime: 1386952042.195641] [122.162000] Unable to accept incoming connection.  Reason: __init__() got an unexpected keyword argument 'parameters'
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 45997)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
    self.finish()
  File "./rosbridge_tcp", line 100, in finish
    self.protocol.finish()
AttributeError: RosbridgeTcpSocket instance has no attribute 'protocol'
----------------------------------------

I've also checked what's inside rosbridge_tcp.py and found those parameters. Maybe the problem might be that they're wrongly configured.

# Global ID seed for clients
client_id_seed = 0
clients_connected = 0

# list of possible parameters ( with internal default values <-- get overwritten from parameter server and commandline)
# rosbridge_tcp.py:
port = 9090                             # integer (portnumber)
host = ""                               # hostname / IP as string
incoming_buffer = 65536                 # bytes
socket_timeout = 10                     # seconds
retry_startup_delay = 5                 # seconds
# advertise_service.py:
service_request_timeout = 600           # seconds
check_response_delay = 0.01             # seconds
wait_for_busy_service_provider = 0.01   # seconds
max_service_requests = 1000000          # requests
# defragmentation.py:
fragment_timeout = 600                  # seconds
# protocol.py:
delay_between_messages = 0.01           # seconds
max_message_size = None                 # bytes

I need some help to overcome this issue. Any help will be greately appreciated. Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-03-25 22:39:01 -0600

mgruhler gravatar image

I know, this is actually quite old by now...

I stumbled upon the same problem recently. If you do not build the rosbridge_suite package that you clone, i guess you include the old rosbride_protocol.py (installed one) which simply does not have the parameter keyword in it's __init__ function. So you can fix it by checking out the current groovy-devel/hydro-devel branch into your workspace and build it with catkin_make (even though it is mainly python).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-12-15 08:41:29 -0600

Seen: 836 times

Last updated: Mar 25 '14