rosrun inside a script
ros kinetic, ubuntu 16.04, intera 5.2 for a sawyer simulation, gazebo 7,
I want to be able to run a python script from an already running python script, and i'm not sure if this is possible and if what i've read already explains what i'm looking for.
Example:
rosrun pkg python_1.py
inside python_1.py, i want to run python_2.py.
What is the equivalent of rosrun
inside a python script?
Since i'm asking about this, i might as well ask, how could i do the same inside a C++
script?
Any information is much appreciated.
Thanks in advance.
~ Luke
Why would you want to do this?
@jayess i have an inverse kinematics script that determines a required pose of a sawyer arm. so after the pose is achieved, i want a separate script to take over which is written independently of the IK script to be called.
Not sure if starting a node inside another one is the correct way to solve your issue, but you can have a look to python subprocess https://pythonspot.com/python-subproc...