# Multiple machine ROS image transmission error

I'm currently trying to establish communication between my Raspberry Pi based robot and a Cluster which are on the same network. Although I am able to ping and SSH one device using the other, I'm still not able to initialise the Raspicam Node(Ubiquiti Robotics node) when roscore is running on the cluster. Also, in the exact opposite circumstances(Roscore running on Raspi) I'm not able to initialise the ORB-SLAM node (ORB-SLAM-ROSNode). The following error shows up in both scenarios:

... logging to /home/pi/.ros/log/721ad8f6-d0dc-11e5-8411-a74b8992ecaa/roslaunch-pi-14554.log

Checking log directory for disk usage. This may take awhile.

Press Ctrl-C to interrupt

Done checking log file disk usage. Usage is <1GB.

RLException: Unable to contact my own server at [http://19.117.56.330:36875/].

This usually means that the network is not configured properly.

A common cause is that the machine cannot ping itself. Please check

for errors by running:

ping [19.117.56.330](http://19.117.56.330:36875)

[http://www.ros.org/wiki/ROS/NetworkSetup](http://www.ros.org/wiki/ROS/NetworkSetup)

The traceback for the exception was written to the log file.


Please take note that the basic talker and listener as mentioned in the suggested link are working perfectly. Is there someone who can tell me what is going on exactly and what's the problem. Also, Is there some other way to transmit images(I'm trying to use FLASK and all but failing since Raspicam sends H.264 codec and OpenCV[VideoCapture() function] is failing to interpret the data). I've heard about LCM(Lightweight Communication and Marshalling) has someone done this before using LCM or is there any resource that can help.

edit 1: All the work was done over an Ethernet-based connection. I experimented by running the simple tutorial. Please take a note that I ran roscore on raspi during the first experiment, and "rqt_graph" and "rosnode list" commands worked perfectly on the cluster. During the second run i ran roscore on the cluster and did the same experiment again by running "rqt_graph" and "rosnode list" on the raspi and I was able to see all the rosnodes during both the experiments. Here is a screenshot of the /.bashrc file.

• Ask for any specifications if required or if I missed any! – DT1729 Jul 5 '19 at 8:05

# Communicating with ROS master

It sounds like you need to point to ROS with the use of user-defined environment variables. I have a set of variables defined in my ~/.bashrc file that define where ROS is located. This is what I have defined on my device that runs roscore:

# ROs
source /opt/ros/kinetic/setup.bash
# SOurce the local workspace
source /home/$USER/catkin_ws/devel/setup.bash # Grab the machine IP addresses machine_ip=(hostname -I) rosport=':11311' rosmasterbegin='http://' # Now we set the ip location for roscore export ROS_MASTER_URI=$rosmasterbegin${machine_ip[0]}$rosport
# This is the hostname of the current machine.
export ROS_HOSTNAME=${machine_ip[0]} # This is the ROS distribution that we are running export ROS_DISTRO=kinetic # Sometimes you need to set ROS_IP for transforms and the parameter server # https://answers.ros.org/question/163556/how-to-solve-couldnt-find-an-af_inet-address-for-problem/ export ROS_IP=${machine_ip[0]}


I suggest you set the ROS_MASTER_URI variable on your Raspi to the cluster running roscore to the output of hostname -I on the cluster. Do make sure that you use the correct ip addresses since you may have many address (wifi, ethernet, etc). Just because you can ping another machine on the network does not mean that ROS can be found. If you could post the outputs of echo $ROS_MASTER_URI and echo$ROS_HOSTNAME in the question, that would allow more people to be able to help you. My suspicion is that you are using the default environment variables and they are not working for you. I suggest you checkout out this link for more information on ROS environment variables.

• My rqt_graph and ros_node list are working fine so I don't think my network has any sort of error. I checked rqt_node by running it on remote PC while roscore was running on Raspi and vice versa.I checked the log file and it shows the following output. I also ran tcpdump but I don't have the exact packet information(since I was working on it during the summers and I can't go back to the office to get those files) however the issue is related to the RPC XML server. – DT1729 Aug 11 '19 at 22:05
• Which machine ran those commands? With multiple-machine comms, you should always mention which machine ran rqt_graph and rosnode list or rostopic list. I have to say, getting my Pis up and running with ROS was also a non-trivial process. Also, is this Wifi or Ethernet? More information would be greatly appreciated. What does your ~/.bashrc file look like? – thatrobotguy Aug 11 '19 at 22:10
• Please check edit 1 in the question. – DT1729 Aug 11 '19 at 22:38
• I see that you are not sourcing your local catkin workspace in your ~/.bashrc file. Are you doing that in the terminal? In other words, you need to run this: source /path/to/my/catkin/workspace/devel/setup.bash – thatrobotguy Aug 11 '19 at 23:04
• Yes, when I run orb slam node on cluster, however I’m using operating system provided by ubiquity robotics for raspberry pi. Advantage is that the node comes preinstalled in the operating system. Note: I’m using a similar looking .bashrc file on both raspberry pi and cluster. – DT1729 Aug 11 '19 at 23:07