gpt4 book ai didi

c++ - ROS:我们能得到一个由launchfile启动的节点列表吗

转载 作者:行者123 更新时间:2023-12-05 04:29:37 26 4
gpt4 key购买 nike

我有不同的启动文件来启动不同的节点。我想在 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

关于c++ - ROS:我们能得到一个由launchfile启动的节点列表吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72263415/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com