0
$\begingroup$

Rosanswers logo

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.


Originally posted by Seagull on ROS Answers with karma: 5 on 2018-03-25

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2018-03-25

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Seagull on 2018-03-25:
Thanks. That solves my problem.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by PeteBlackerThe3rd with karma: 9529 on 2018-03-25

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2018-03-25:
This is explained in the Q&As that I linked. I didn't want to duplicate all of that again.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.