Best way to determine if ROS is installed

You know that the install path for binaries is /opt/ros/<distro>/*. You’d have to ask someone at OR if that’s configurable, but to my knowledge that’s just were it goes. You could check for an /opt/ros directory existing and then checking for the <distro>s specifically installed (e.g. Noetic and/or Foxy).

For the case of production robots (assuming they don’t use docker or similar) it could be installed anywhere if doing custom packaging so I’m not sure that would hold up for all users.