Should I source the overlay in my .bashrc file?

asked 2020-11-15 19:20:10 -0500

cmoore gravatar image

I'm new to ROS2, and following the online tutorials.

In the very first tutorial, at, it says to source /opt/ros/<distro>/setup.bash. It then goes on to suggest adding that to my .bashrc so that it happens automatically when I log in.</distro>

Now I'm onto the second section in the tutorial, "Beginner: Client Libraries." In the first section at it says, "Sourcing an overlay in the same terminal where you built, or likewise building where an overlay is sourced, may create complex issues."

That seems to contradict the idea of putting it in my .bashrc. If it's important to NOT have an overlay sourced when I do a build, then I don't want it sourced every time I login.

Can someone clarify this for me?

edit retag flag offensive close merge delete


Some conflicting info. Moreover, that comment doesn't provide any reference to what those issues are. But in a tutorial on using colcon, there is no such warning:

sergeyk gravatar image sergeyk  ( 2020-12-17 16:57:21 -0500 )edit