Robotics StackExchange | Archived questions

I want to know the part of the ROS2 source code that is doing the communication.

What I want to know: When communicating and publsihing data, what specific part of the source code is sending the data?

What I did: In VScode, I went to the definition of publish() in the ROS2 demo's talker.cpp, and from the publish definition, moved to the definition from where the communication seemed to be taking place... and repeated the search. When multiple definitions were referenced, I added print statements etc. to the ROS2eloquent source code built on Ubuntu 18.04 and checked if they changed when I ran the talker.

Current: Stuck with the above method, searched for UDP in VScode, found UDPTransportInterface::send() in UDPTransportInterface.cpp, rewrote the source code and checked, but even after deleting the publsih() section in talker.cpp, the UDPTransportInterface::send() does not work. I guessed that it was not the part sending data, since UDPTransportInterface::send seemed to be running even if I deleted the "publsih()" part of the talker.cpp, and it was not running at the timing to publish.

If you know the part that is communicating, or know how to find it correctly, please let me know.

This text was written using translation software, sorry for any errors.

Asked by DearTomo on 2022-10-04 07:28:22 UTC

Comments

Answers