I tried this:
import subprocess
subprocess.Popen(['roscore'])
time.sleep(1)
subprocess.run(['ls','-l'])
But the "ls -l" part is not run because of "roscore". How could I run roscore in background, and continue with other instructions in the python file.
↧