ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'm not sure how robust it is, but one way to approach this would be to check for certain command line arguments (CLAs) that indicate that the binary or the script has been started by roslaunch. This would be almost 'the reverse' of what is described in #q272267.

Examples of such arguments are __name and __log. Those should be present in the argv of any program started from a launch file. Users could of course add those CLAs when invoking your script or starting your binary, but abuse is probably always possible.