Do I have to source both ros2_galactic/install/setup.bash and /opt/ros/galactic/setup.bash?
TLDR:
Even with a source based install of ROS2, running rosdep will install libraries into /opt/ros/galactic/
. To have all packages available in every terminal I open, do I have to source both ros2_galactic/install/setup.bash
and /opt/ros/galactic/setup.bash
?. If so, in which order?
Description:
I installed ros2_galactic from source following the instructions in the galactic tutorial. I was next trying to install Moveit, and was coming across a CMake error indicating that the eigen_stl_containers library was missing.
Could not find a package configuration file provided by
"eigen_stl_containers" with any of the following names:
eigen_stl_containersConfig.cmake
eigen_stl_containers-config.cmake
Although the rosdep command in the previous step should have downloaded eigen_stl_containers, I ran sudo apt install ros-galactic-eigen-stl-containers
, but the output stated that I had the library already installed.
ros-galactic-eigen-stl-containers is already the newest version (1.0.0-3focal.20210507.020504).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
It turned out that the problem was I was only running source ~/ros2_galactic/install/setup.bash
, but the eigen_stl_containers was installed through binaries so I had to also run source /opt/ros/galactic/setup.bash
.
To have all packages available in every terminal I open, do I have to add both of those commands to ~/.bashrc
, and if so, in which order?