Distro info: I am using Melodic on Ubuntu 18.04
Network info - on the same subnet: 2 hosts (1 client, 1 server), 8 port switch, and a laptop to remote into each one, OS1-64 lidar sensor, and an ip camera.
I have a client node using a roscore server to act as the central point for the sensors. I can get topics and see messages to the client just fine and even render images and video from the client node however... here is my problem i hope i can get advice from.
I would like to be able to use rosbridge on the client node which is acting like an edge device however when i run it with the server/client configuration it is unable to receive certain messages and is not able to render the lidar point clouds but when I run this on server it has no issues.
Now i have two issues I observed so far that I need advice on, the first is ROS_HOSTNAME, rosbridge expects a hostname for the localhost(client) or it will throw an error like so:
RLException: Unable to contact my own server at [http://172.18.21.80:45109/]. This usually means that the network is not configured properly.
Second is when ROS_HOSTNAME is configured as localhost i get a warning message in /rosout. The non-local host is the server node.
[WARN][1596242809.777802944][/rosbridge_websocket]: attempted to connect to non-local host [172.18.21.80] from a node launched with ROS_HOSTNAME=localhost
and the following message in the webviz viewer im using:
This can happen e.g. when playing a bag from a different codebase. Message types could not be found for these topics: /os1_node/imu_packets /os1_node/lidar_packets
when running this on the server node these issues are no longer a problem and the topics render as expected. How can I run rosbridge on a client node? Is there a config or wiki page can reference? I have not found anything on this yet. Hoping someone can help shed some light.
Originally posted by AdamS on ROS Answers with karma: 7 on 2020-07-31
Post score: 0
Original comments
Comment by gvdhoorn on 2020-08-01:
You mention the words slave and master, but ROS interactions are primarily peer-to-peer and client-server.
Could you please clarify what you mean by "slave node" and "master node"? Are these just two different machines? Please don't use the word "node" then, as in ROS, a "node" is something very specific: wiki/Nodes.
rosbridge expects a hostname for the localhost(slave) or it will throw an error
No, not as far as I know.
And that error message is not generated by rosbridge
, but roslaunch
.
Comment by AdamS on 2020-08-01:
the terminology i used is more illustrative to the configuration i setup. that question will help me clarify things. there is one server running roscore and the edge device is setup to listen on the topics from the roscore server. the ROS_IP, ROS_HOST and ROS_MASTER_URI is set to the server running roscore on both the server(master/server) and edge device(slave/client). i have edited the original to replace master slave with server client to keep it clear for future readers.
the command run on the client is: roslaunch rosbridge_server rosbridge_websocket.launch wich is what is producing that error.