Not able to see tcp packet related with specific ros node in Wireshark.
I am trying to capture packet that is published by ros node in wireshark. As an example, when I do rostopic info /mytopic, output is
Type: geometry_msgs/Twist
Publishers:
- /rostopic_52585_1458465649198 ( http://192.168.156.152:60176/ ) Subscribers: None
So, in the wireshark, when I use filter tcp.port == 60176 , I should see tcp packets related with messages being published on /mytopic, but nothing appears in the wireshark after applying that filter. Does anyone have any idea, what I am doing wrong?
Edit: Just to clarify, a robot model is continuously publishing its position and velocity information over some topic. So I should be able to see related packets in the wireshark, but I don't know how to do that! Thanks.
ROS is using TCP ( http://wiki.ros.org/ROS/Technical%20O... ) so a package can only appear if you have both subscriber and publisher. So if you run "rostopic echo /mytopic" in another terminal, the package should be shown in wireshark.
I guess the same concept would apply for ROS services
@DavidN, nope. It didn't work. I tried doing rostopic echo /mytopic in one terminal and in another terminal I checked for port number by executing rostopic info /mytopic and then I applied the filter to the wireshark. Still I can't see anything.
I'm assuming this is on a Linux machine, and I'm also assuming you are using only a single machine.
That means that all ROS traffic will go through the tcp loopback device (
lo
on Linux), so you'll have to make sure you're capturing on that (and not, fi,eth0
).Yes, your assumptions are correct. I am using Ubuntu 14.04 and everything is on single machine. Nevertheless, I am capturing on lo and not on any other interface. Actually I also tried capturing on all the interfaces. But this doesn't work.
I may try running ROS node on different machine and then try to capture next day. But you see, if my robot is publishing position and velocity information continuously then I should see flood of ros tcp messages in wireshark which is not happening.
Ok. This is getting more and more interesting (at least for me). After digging and trying for hours, this is what I found:
ss -lp | grep node_name
, you will see 2 ports being opened by this node(cont)
(cont.) 2. When you publish the topic /my_topic, a new node is launched (named rostopic_xxxx) and this node will open 2 ports. In order to see the package from wireshark, you need to try to filter each of the port to see if the package is there.