Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To answer the actual question first:

  • The local_setup.<ext> script sets up the environment for all package in the prefix path where that script is. It doesn't include any parent workspaces.
  • The setup.<ext> script on the other hand sources the local_setup.<ext> script for all workspaces which were sourced in the environment when this workspace was built. And then it also sources the sibling local_setup.<ext> script.

What does that mean:

  • If you want to source the first workspace (e.g. /opt/ros/ardent) it doesn't make any difference because that workspace doesn't have any parent workspaces.

  • If you have built your own workspace ~/ws after sourcing /opt/ros/ardent you can do either of the following:

    • Source ~/ws/install/setup.<ext> to setup the environment to include paths from /opt/ros/ardent as well as ~/ws/install.

    • That is the same as if you would source /opt/ros/ardent/(local_)setup.<ext> first and then ~/ws/install/local_setup.<ext>.