ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How accurate do you need the data to be? You can find out when each node (un)registers for subscriptions and publications in master.log, which is usually in ~/.ros/log/latest. Here's an example of some output:

[rosmaster.master][INFO] 2021-02-09 09:18:53,983: +PUB [/rosout] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:18:53,984: +PUB [/topic1] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:18:53,984: +PUB [/topic2] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:18:53,988: +PARAM [/node1/param1] by /node1
[rosmaster.master][INFO] 2021-02-09 09:18:53,988: +PARAM [/node1/param2] by /node1
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/clock] /node1 http://tundra:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf] /node1 http://tundra:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf_static] /node1 http://tundra:34533/
...
[rosmaster.master][INFO] 2021-02-09 09:19:44,369: -PUB [/rosout] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,369: -PUB [/topic1] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,369: -PUB [/topic2] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/clock] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf_static] /node1 http://computer:34533/

Also, you can find info, warnings, and errors in rosout.log. There will be other files in the same folder, depending on your logging configuration. I'm not sure if the standard logs will contain all the information you need, but you can customize the logging: C++ wiki, Python wiki.

How accurate do you need the data to be? You can find out when each node (un)registers for subscriptions and publications in master.log, which is usually in ~/.ros/log/latest. Here's an example of some output:

[rosmaster.master][INFO] 2021-02-09 09:18:53,983: +PUB [/rosout] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:18:53,984: +PUB [/topic1] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:18:53,984: +PUB [/topic2] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:18:53,988: +PARAM [/node1/param1] by /node1
[rosmaster.master][INFO] 2021-02-09 09:18:53,988: +PARAM [/node1/param2] by /node1
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/clock] /node1 http://tundra:34533/
http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf] /node1 http://tundra:34533/
http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf_static] /node1 http://tundra:34533/
http://computer:34533/
...
[rosmaster.master][INFO] 2021-02-09 09:19:44,369: -PUB [/rosout] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,369: -PUB [/topic1] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,369: -PUB [/topic2] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/clock] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf_static] /node1 http://computer:34533/

Also, you can find info, warnings, and errors in rosout.log. There will be other files in the same folder, depending on your logging configuration. I'm not sure if the standard logs will contain all the information you need, but you can customize the logging: C++ wiki, Python wiki.

How accurate do you need the data to be? You can find out when each node (un)registers for subscriptions and publications in master.log, which is usually in ~/.ros/log/latest. Here's an example of some output:

[rosmaster.master][INFO] 2021-02-09 09:18:53,983: +PUB [/rosout] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:18:53,984: +PUB [/topic1] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:18:53,984: +PUB [/topic2] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:18:53,988: +PARAM [/node1/param1] by /node1
[rosmaster.master][INFO] 2021-02-09 09:18:53,988: +PARAM [/node1/param2] by /node1
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/clock] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf_static] /node1 http://computer:34533/
...
[rosmaster.master][INFO] 2021-02-09 09:19:44,369: -PUB [/rosout] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,369: -PUB [/topic1] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,369: -PUB [/topic2] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/clock] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf] /node1 http://computer:34533/
[rosmaster.master][INFO] 2021-02-09 09:19:44,372: -SUB [/tf_static] /node1 http://computer:34533/

Also, you can find info, warnings, and errors in rosout.log. There will be other files in the same folder, depending on your logging configuration. I'm not sure if the standard logs will contain all the information you need, but you can customize the logging: C++ wiki, Python wiki.

If you're using launch files, each of their logs may indicate more precisely what you want. An example:

...
[roslaunch][INFO] 2021-02-09 09:18:48,568: process[node1-6]: started with pid [16366]
[roslaunch][INFO] 2021-02-09 09:18:48,568: ... successfully launched [node1-6]
...
[roslaunch][INFO] 2021-02-09 09:19:44,010: [node1-6] killing on exit
[roslaunch][INFO] 2021-02-09 09:19:44,011: process[node1-6]: killing os process with pid[16366] pgid[16366]
[roslaunch][INFO] 2021-02-09 09:19:44,011: [node1-6] sending SIGINT to pgid [16366]
[roslaunch][INFO] 2021-02-09 09:19:44,012: [node1-6] sent SIGINT to pgid [16366]
[roslaunch][INFO] 2021-02-09 09:19:44,413: process[node1-6]: SIGINT killed with return value 0
...