ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

what is the point of sourcing setup.bash file during installation of ROS

asked 2017-01-23 03:43:24 -0600

sam26 gravatar image

What does sourcing mean ( in simple terms ) and why are we sourcing setup.bash during installation ? [ echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc source ~/.bashrc ]

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-01-23 04:32:45 -0600

gvdhoorn gravatar image

What does sourcing mean [..]

This is a rather general question. See What is the difference between “source” and “./”? on SO and Bash Prompt HOWTO - Bash Programming and Shell Scripts - Sourcing a File for some background.

why are we sourcing setup.bash during installation ?

The Environment Setup section of the installation tutorial gives a hint:

[..] the ROS environment variables are [..] added to your bash session every time a new shell is launched [..]

setup.bash (or .sh or .zsh) sets up your current command interpreter session with the configuration items necessary for ROS to function properly. In other words: it tells bash where the ROS programs and libraries are, tells Python where it can find the rospy libraries, etc.

edit flag offensive delete link more

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


Asked: 2017-01-23 03:43:24 -0600

Seen: 574 times

Last updated: Jan 23 '17