How to Know the port number after the topic are subscribed
I'm running cartographer_node (at a server, computer) which subscribed to rplidar_node(at a client, jetson nano) at /scan topic using ROSUDP, and I want to get the specific udp port of the cartographer_node of the server and rplidar_node of the client.
from the wireshark, I saw at first the rplidar would tell the master its ip:port(but it is TCPROS)
Afterwards, the cartographer_node(at server) would request a topic and passing its ip:port of the /scan topic to the client (I'm new here so I can't upload photos...) but then it just connected and sends topic data
I'm wonder if there is a sign to it?
I know there would be ephemeral ports after the publish-topic-subscribe are established, but is there anyways to know the ports of the specific topic of two ends after the socket are established?
I looked into codes of roscomm, but hard to understand
any assistance of yours would be greatly appreciated.
Thanks https://answers.ros.org/question/1253...
the
rosnode info <node_name>
can solve
but its there some api-based method instead? And anyone knows the mechanism of how the ROSUDP establish socket connect and its difference with ROSTCP?