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

Permanently adding workspace to ROS environment

asked 2018-09-18 09:02:58 -0600

Drkstr gravatar image

I am following this tutorial to create a new ROS package. In step 4 we build the catkin workspace and sourc the setup file and once this is done I can do a roscd beginner_tutorials from anywhere and it will take me to ~/catkin_ws/src/beginner_tutorials brilliant! ...until I close the terminal window and open a new one. Now roscd <TAB> <TAB> doesn't show "beginner_tutorials" as an option. If I re-source my setup file i.e. do a . ~/catkin_ws/devel/setup.bash everything works again.

Do I need to source my setup file everytime I open a new terminal window or is there some way to permanently add it to my ROS environment?

I have this source /opt/ros/kinetic/setup.bash at the end of my .bashrc file.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2018-09-18 09:12:39 -0600

Hug gravatar image

If you're always working with that workspace, you can just add source ~/catkin_ws/devel/setup.bash at the end of your .bashrc.

edit flag offensive delete link more
1

answered 2018-09-18 09:23:09 -0600

Hypomania gravatar image

updated 2018-09-18 09:23:40 -0600

To permanently add it without having to source it all the time, use this: echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-09-18 09:02:58 -0600

Seen: 1,901 times

Last updated: Sep 18 '18