Ask Your Question

How to get the line "source devel/setup.bash" to run after every time you catkin_make? [closed]

asked 2014-01-14 07:45:56 -0600

randylewis7 gravatar image

I have "source devel/setup.bash" added to my bashrc file, but sometimes, if I create a new package and then compile it for the first time with "catkin_make", then I find I need to open a new terminal in order to run the package because the terminal I already have open needs to source devel/setup.bash again.

Does anyone know how to get "source devel/setup.bash" to run every time I do catkin_make? Or otherwise how to solve this problem?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by randylewis7
close date 2014-07-02 11:17:22.575422

1 Answer

Sort by ยป oldest newest most voted

answered 2014-01-30 22:32:28 -0600

urthkakao gravatar image

updated 2014-01-30 22:34:21 -0600

1) Either you must run the above source command each time you open a new terminal window

2) or add it to your .bashrc file as follows.

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

I found the above instruction from this website:

edit flag offensive delete link more



catkin_make  &  source devel/

or even set up an alias for that e.g. in your ~/.bashrc

alias catkin_make_and_source='catkin_make & source devel/'
Will Chamberlain gravatar imageWill Chamberlain ( 2016-11-06 03:18:36 -0600 )edit

Question Tools



Asked: 2014-01-14 07:45:56 -0600

Seen: 10,360 times

Last updated: Jan 30 '14