Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected behavior of client/client.cpp? #8

Open
shineyruan opened this issue Mar 11, 2021 · 5 comments
Open

Expected behavior of client/client.cpp? #8

shineyruan opened this issue Mar 11, 2021 · 5 comments

Comments

@shineyruan
Copy link

Hi,

I was trying to run ./rosbridge2cpp-client as a test of functionality on Ubuntu 20.04 + Noetic. However my rosbridge_server does not output any data received and it also does not advertises the topic within ROS created by the client. I'm getting the following output from the client side:

[TCPConnection] Socket created
[TCPConnection] Connected
[TCPConnection] Setting up receiver thread...
[TCPConnection] Receiving
[TCPConnection] bson_only_mode is : 1
.
[TCPConnection] Data send (144 Bytes):
:90:00:00:00:02:6f:70:00:0a:00:00:00:61:64:76:65:72:74:69:73:65:00:02:69:64:00:20:00:00:00:61:64:76:65:72:74:69:73:65:3a:2f:74:65:73:74:5f:72:6f:73:62:72:69:64:67:65:32:63:70:70:3a:31:00:02:74:6f:70:69:63:00:14:00:00:00:2f:74:65:73:74:5f:72:6f:73:62:72:69:64:67:65:32:63:70:70:00:02:74:79:70:65:00:10:00:00:00:73:74:64:5f:6d:73:67:73:2f:53:74:72:69:6e:67:00:10:71:75:65:75:65:5f:73:69:7a:65:00:0a:00:00:00:08:6c:61:74:63:68:00:00:00[TCPConnection] Data end

[TCPConnection] Data send (8f Bytes):
:8f:00:00:00:02:6f:70:00:08:00:00:00:70:75:62:6c:69:73:68:00:02:69:64:00:1e:00:00:00:70:75:62:6c:69:73:68:3a:2f:74:65:73:74:5f:72:6f:73:62:72:69:64:67:65:32:63:70:70:3a:32:00:02:74:6f:70:69:63:00:14:00:00:00:2f:74:65:73:74:5f:72:6f:73:62:72:69:64:67:65:32:63:70:70:00:08:6c:61:74:63:68:00:00:03:6d:73:67:00:28:00:00:00:02:64:61:74:61:00:19:00:00:00:50:75:62:6c:69:73:68:20:66:72:6f:6d:20:54:65:73:74:20:43:6c:69:65:6e:74:00:00:00[TCPConnection] Data end

I have also verified that rosbridge_server has established a connection with the client

[INFO] [1615441368.612716]: Rosbridge TCP server started on port 9090
[INFO] [1615441373.894233]: [Client 0] connected. 1 client total.

However the topic /test_rosbridge2cpp was not published within ROS and I had no way to retrieve data from rosbridge_server side.

Does that look normal for the client test? If yes, is there anything else I need to do in order to retrieve data from rosbridge_server besides launching it with

roslaunch rosbridge_server rosbridge_tcp.launch bson_only_mode:=True

?

Thanks in advance!

@Sanic
Copy link
Owner

Sanic commented Mar 11, 2021

Hi!
Which version of rosbridge do you use?
Some users in ROSIntegration reported that newer eversions of it might break the rosbridge connection:
code-iai/ROSIntegration#139

@shineyruan
Copy link
Author

Hi!

Which version of rosbridge do you use?

Some users in ROSIntegration reported that newer eversions of it might break the rosbridge connection:

code-iai/ROSIntegration#139

Hi,

I tried both the latest version (0.11.13) and the "working" version (0.11.10) according to code-iai/ROSIntegration#139, and both of them has the same outcome --- not publishing any desired topics within ROS Noetic.

Thanks

@RamanZharkou
Copy link

RamanZharkou commented May 15, 2021

I am having a similar issue.
I debugged the rosbridge_server code and found that I am getting an exception here (added try/catch):
https://github.com/RobotWebTools/rosbridge_suite/blob/develop/rosbridge_server/src/rosbridge_server/tcp_handler.py#L62

[ERROR] [1621035498.547522]: Exception in recvall(). Reason: can only concatenate str (not "bytes") to str

It looks like Python 3 compatibility issue to me.

@wuyingnan
Copy link
Contributor

This is a bug caused by rosbridge_server decoding byte array as utf-8 in Python3. There is actually an open PR in rosbridge that works for me. I think they will merge that PR recently into rosbridge.

@Sanic
Copy link
Owner

Sanic commented Dec 3, 2021

@wuyingnan Many thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants