Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 85

What does source command actually do?

$
0
0
Hi, I've read that $ source devel/setup.bash is the same as $ .devel/setup.bash and that it reads and executes setup.bash script in **the current shell**. Opposite to this $ ./devel/setup.bash what would run the same script but **launching new shell**. So we want to run $ source command everytime we open new terminal. Following questions are: 1. Its not clear to me what actually am I doing with the source command. Where can I find this bash file that contains these enviroment variables, so I can track what's going on? 2. Can I permanently add required enviromental variables so I don't have to do it manually every time I open a terminal? What are pros and cons of doing such. 3. I followed tutorial. Entered this: $ source devel/setup.bash $ echo $ROS_PACKAGE_PATH Which gave me: /home/username/Workspace/ros-workspace/tutorial_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks Then I entered this: $ source /opt/ros/indigo/setup.bash $ echo $ROS_PACKAGE_PATH Which gave me: /opt/ros/indigo/share:/opt/ros/indigo/stacks Why such sequence erased my ~/home... path from bash??

Viewing all articles
Browse latest Browse all 85

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>