Ask Your Question
0

For every newly opened terminals, why do I have to source and execute catkin_make again?

asked 2018-03-25 02:57:34 -0600

Seagull gravatar image

updated 2018-03-25 02:58:02 -0600

I' m new to ROS, and running ROS kinetic on a raspberry pi 3B with ubuntu installed.

I have noticed that each time I open up a new terminal, I have to source /opt/ros/kinetic/setup.bash and execute catkin_make though I have done so previously in other terminals.

I don' t know whether it is correct to source and catkin_make every time or something has gone wrong. Please help.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
3

answered 2018-03-25 04:33:45 -0600

gvdhoorn gravatar image

I have noticed that each time I open up a new terminal, I have to source /opt/ros/kinetic/setup.bash

yes, that is needed in every terminal (or really: bash instance)

and execute catkin_make

No, that should not be needed.

why do I have to source and execute catkin_make again?

This question has been posted and answered quite a few times already. See the following for related / duplicate questions: #q124131, #q239131, #q229365, #q188309 and #q200174.

And the following questions try to explain why this is needed: #q241528, #q251292 and #q252715.

In short: setup.bash configures your shell so that it can find ROS programs and lets those programs find the required ROS packages.

edit flag offensive delete link more

Comments

Thanks. That solves my problem.

Seagull gravatar imageSeagull ( 2018-03-25 23:08:53 -0600 )edit
1

answered 2018-03-25 06:49:55 -0600

If you want to avoid having to manually source your workspace you can add the line to your .bashrc file.

source <path to my workspace>/devel/setup.bash

Then this will automatically be executed every time you open a new terminal. As gvdhoorn has said, there is no reason you should have to re-catkin_make your workspace in every terminal. Try adding this line to your .bashrc file and let us know if this doesn't solve your problem.

edit flag offensive delete link more

Comments

This is explained in the Q&As that I linked. I didn't want to duplicate all of that again.

gvdhoorn gravatar imagegvdhoorn ( 2018-03-25 07:08:56 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-03-25 02:57:34 -0600

Seen: 259 times

Last updated: Mar 25 '18