Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Any packages you want to use will need to exist on paths on the various ROS environment variables (e.g. PATH, AMENT_PREFIX_PATH, etc). The order in which you source these should be determined by what you want to have priority.

Environment variable additions are prepended so if you had both source and binary installations of a given package, priority would be given to the one you sourced the most recently. In your case, you probably want to prioritize the source installation, so you would probably want to:

source /opt/ros/galactic/setup.bash
source ~/ros2_galactic/install/setup.bash

You can add these two lines to the end of your .bashrc if you don't want to manually source both paths every time you open a new terminal.