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

How to create a catkin workspace through python script?

asked 2017-04-13 06:12:07 -0500

YusraAzhar gravatar image

I want to create catkin workspace and packages through python script instead of the terminal. Any chance anybody tried it? if yes, please help.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-04-13 14:59:53 -0500

yes, for sure, you can with python execute the same commands in a scrypt automatically as if you were typing those by hand on a terminal, just refer to the python doc if you need more specific info

you need to import the os lib and then invoke the os.system

example:

import os
cmd = 'mkdir -p ~/catkin_ws/src'
os.system(cmd)

os.system('catkin_make')

python doc

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-04-13 06:12:07 -0500

Seen: 286 times

Last updated: Apr 13 '17