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

Revision history [back]

click to hide/show revision 1
initial version

Normally i source my environment with "source /devel/setup.bash" but i noticed in the tutorial that there is a period before the file location "source ./devel/setup.bash" Why is that period there?

A . (dot) in a path refers to the "current directory".

It makes whatever path comes after the dot relative to the current directory.

So source ./devel/setup.bash sources the file setup.bash in a directory called devel that must be in the current directory.

However, all paths not starting with a / are relative to the current working directory, so the dot is not actually necessary here.

This is my first post so im not sure where to really ask this question.

In the end this is not really a ROS question (more a general Linux one), but given the context it's fine.