ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
With rosnode list
you have the list of nodes.
If you want the PID of the node /rosout
, for example, you can use:
rosnode info /rosout 2>/dev/null | grep Pid| cut -d' ' -f2
If a node named /rosout
exists, the PID (like 5027) will be shown. Otherwise, nothing will be printed because we are redirecting the error to /dev/null