ROS:我们可以得到一个由launchfile启动的节点列表吗?



我有不同的启动文件,启动不同的节点。我想在UI中显示已启动的节点。

我可以得到运行的节点没有问题,但有一个角落的情况下,它不会显示所有的节点在启动文件:如果节点崩溃后,它已经启动。

当您通过roslaunch启动启动文件时,您可以看到节点列表

started roslaunch server http://vm:40549/
SUMMARY
========
PARAMETERS
* /rosdistro: noetic
* /rosversion: 1.15.14
NODES
/
GNSS (gnss_dummy/gnss_dummy_node)
IMU (imu_dummy/imu_dummy_node)
Video_recorder (video_recorder/video_recorder_node)

是否有检索列表的方法?

[Video_recorder-9] process has finished cleanly

或者我们可以检索终止的节点吗?

使用选项

--nodes <package-name> <launch-file>

--nodes <launch-file>

检索启动文件的节点。

例如:

roslaunch --nodes roslaunch $ROS_ROOT/tools/roslaunch/example.launch

roslaunch --nodes roslaunch example.launch

:

http://wiki.ros.org/roslaunch/Commandline%20Tools