can't run ros commands via subprocess
Hello, I try to write subprocess script but each time I try to write ros related commands I occur following an error. for example, when I try to run
subprocess.Popen("roscore", shell=True)
I get
/bin/sh: 1: roscore: not found
in .bashrc I added the following lines:
source /opt/ros/noetic/setup.bash source ~/catkin_ws/devel/setup.bash
I think that somehow I need to source the subprocess too but Im not quite sure how because when I run
subprocess.Popen([".", "/opt/ros/noetic/setup.bash"], shell=True)
It goes without errors but I still get errors when I try to run ros related commands.
thanks.
Asked by omeras on 2022-11-20 11:42:24 UTC
Comments