Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What is the difference between local_setup.bash and setup.bash

In ROS2, we always source the local_setup.bash while working with the original parent workspace. Now lets say if i create an overlay workspace and create my own package, then while trying to build it, shall i source the local_setup.bash or the setup.bash.

My observation : if i start a new terminal and try these commands :

cd ~/ros2_overlay_ws/
source install/ local_setup.bash
ament build

This gives me an error stating ament: command not found

But if i source the setup.bash file instead, the build is successfull. wehereas i thought local_setup.bash file is used for sourcing the current variables to the current path. So it sould have built with the local_setup.bash Could anyone please clear out the differences ?