Retrieve package and binary/script of running ROS node
rosgraph and other tools in ros_comm provide access to much data, but there are two pieces of data I cannot figure out how to access.
In https://github.com/ros/ros_comm/blob/noetic-devel/tools/roslaunch/src/roslaunch/core.py#L416 , roslaunch defines a Node
object that has the package name and the source file of node stored as attributes
questions:
- Does "roscore" store this information in a centralized place, or is this only used for start up?
- Is the same information available for nodes started with "rosrun"
- How can I query this information using the remote tools (e.g. XMLRPC via rosgraph)
- Given a running ros deployment, is there any way to find out what package and file a running node is from?
Asked by dcconner on 2020-08-05 10:12:15 UTC
Comments
Just a comment, as I'm not 100% sure it's all correct:
ps -p $PID_OF_ROS_NODE -o args
and process that. But that's not really an answer I feel. #q271777 and #q271776 show how to use these APIs with Python)And by this:
I guess you mean the binary or the script? The source (for compiled languages) would be useless, as it typically cannot be executed directly.
Asked by gvdhoorn on 2020-08-06 04:22:24 UTC
If your last question is actually what you're after, I believe your question is a duplicate of #q162251.
Asked by gvdhoorn on 2020-08-06 04:33:56 UTC
@gvdhoorn Thank you for reply. These were the answers I expected based on my research, but wanted to make sure I didn't miss something. Your linked questions were helpful.
Asked by dcconner on 2020-08-06 19:56:55 UTC
Assuming #q162251 answers this, I'm closing your question as a duplicate.
Asked by gvdhoorn on 2020-08-07 02:14:23 UTC