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

Do I have to add my workspace to the ros environment every time I start the terminal ?

asked 2016-03-03 01:15:43 -0500

ATOM gravatar image

I have started working on the tutorial and in the third tutorial (Creating ros package) I was instructed to add my workspace the ros environment. Suppose I have created the package and added my workspace to the ros environment then I closed the terminal and the system, so the next time I open the terminal and my workspace using ($ cd ~/my_workspace), do I have to add my workspace to the ros environment again.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-03 02:22:16 -0500

If you are working under Ubuntu, to avoid having to add your workspace manually to the ros environment you should add the following line to the file ~/.bashrc

source ~/my_workspace/devel/setup.bash

This will automatically load your workspace every time you open a new terminal.

Hope this helps

edit flag offensive delete link more

Comments

I had the same problem like ATOM, so I also added you given line to my system-wide bash.bashrc-file. But it says, that I don't have permission to save it. What can I do? Thanks in advance!

DBServ gravatar image DBServ  ( 2018-02-05 08:54:06 -0500 )edit

To modify the system-wide bashrc file you need root privileges. Try using sudo.

Martin Peris gravatar image Martin Peris  ( 2018-02-19 17:51:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-03 01:15:43 -0500

Seen: 405 times

Last updated: Mar 03 '16