Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ROS: Can we get a list of nodes started by launchfile

Tags:

c++

xml

ros

I have different launchfile that launch different nodes. I would like to display the launched nodes in a UI.

I can get the running nodes with no problem but theres one corner case where that wont display all the nodes in the launch file: if the node crashed after it has started.

when you launch the launch file via roslaunch, you can see a list of nodes

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)

is there anyway to retrieve that list ?

[Video_recorder-9] process has finished cleanly

or can we retrieve the terminated nodes ?

like image 394
Patrick Charron Morneau Avatar asked Nov 04 '25 10:11

Patrick Charron Morneau


1 Answers

Use options

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

or simply

--nodes <launch-file>

to retrieve the nodes of the launch file.

e.g.:

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

or

roslaunch --nodes roslaunch example.launch

See:

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

like image 63
marc wellman Avatar answered Nov 07 '25 05:11

marc wellman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!