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

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

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

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
1

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

gvdhoorn gravatar image

What does sourcing mean [..]

This is a rather general question. See What is the difference between “source script.sh” and “./script.sh”? 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

Question Tools

1 follower

Stats

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

Seen: 628 times

Last updated: Jan 23 '17