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

It doesn't exist in ROS2. If you're on Linux, you should be able to use some utilities to do what you want:

watch ros2 topic list will show the current topics (by default every 2 seconds) but won't accumulate like you want.

Try this one-liner shell (bash or bash-like) script to gather all the topics into a file called topics.txt:

> topics.txt; while true; do ros2 topic list >> topics.txt; sort -u -o topics.txt topics.txt; sleep 1; done

It doesn't exist in ROS2. If you're on Linux, you should be able to use some utilities to do what you want:

watch ros2 topic list will show the current topics (by default every 2 seconds) but won't accumulate like you want.

Try this one-liner two-liner shell (bash or bash-like) script to gather all the topics into a file called topics.txt:

> topics.txt; topics.txt

while true; do ros2 topic list >> topics.txt; sort -u -o topics.txt topics.txt; sleep 1; done

It doesn't exist in ROS2. If you're on Linux, you should be able to use some utilities to do what you want:

watch ros2 topic list will show the current topics (by default every 2 seconds) but won't accumulate like you want.

Try this two-liner shell (bash or bash-like) script to gather all the topics into a file called topics.txt:

> topics.txt

while true; do ros2 topic list >> topics.txt; | sort -u -o topics.txt topics.txt; topics.txt -; sleep 1; done