An argument is missing in the 'outgoing' function of the class Protocol.
See original GitHub issueDescription In ROS1 in version 0.11.15 a bug has been introduced. I was working with rosbridge via TCP and I got the following traceback in the terminal:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/ros/noetic/lib/python3/dist-packages/rosbridge_library/internal/services.py", line 78, in run
self.error(e)
File "/opt/ros/noetic/lib/python3/dist-packages/rosbridge_library/capabilities/call_service.py", line 116, in _failure
self.protocol.send(outgoing_message)
File "/opt/ros/noetic/lib/python3/dist-packages/rosbridge_library/protocol.py", line 277, in send
self.outgoing(serialized, compression)
TypeError: send_message() takes from 1 to 2 positional arguments but 3 were given
Looking at the code I have seen that the outgoing()
function working with websocket accepts a new parameter named compression
. But in TCP it doesn’t work because the outgoing
function is not overridden. Consequently the error shown above appears, because the base function does not accept that argument.
I have seen that in the classes RosbridgeTcpSocket
, RosbridgeUdpSocket
and RosbridgeWebSocket
there is an assignment where self.protocol.outgoing = self.send_message
and in the 3 definitions of the send_message
function the compression
argument is never given.
- Library Version: 0.11.15
- ROS Version: Noetic
- Platform / OS: Ubuntu 20.04
Steps To Reproduce Just establish a TCP connection and start transmission.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top GitHub Comments
@achim-k Tested and works correctly in a TCP transmission. Thanks for the quick response.
@ribes4 could you confirm that #812 fixes the issue? I tested it locally but it would be great if you could test it as well. I didn’t add a unit test as it seemed to much work and on ros2 rosbridge_server does not provide UDP/TCP support anymore.
Will create a new release, which should land in noetic with the next sync expected to be early november.