Best way to check if ROS is running
I am writing a script, which relies on ROS currently running. I would like to check if ROS is currently running on the script's machine. What's the best way to do this?
A couple ways I am considering are pinging Master URI and checking the processes. However, I'm asking to see if there's a better way. Perhaps an environment variable is set.