Help With ROS2 Installation Locations (Ubuntu 20.04)
I've got everything installed and working decently and am underway, but one thing that isn't quite clear is where the ROS installation is supposed to be located.
Following the install tutorial (https://docs.ros.org/en/foxy/Installa...), I downloaded the tarball and extracted it to ROS2 in the home directory: ~/ros2_foxy. I sourced the setup file and everything worked fine.
Later on I was going through a Nav2 tutorial (https://navigation.ros.org/setup_guid...) about URDF which required installations of joint state publisher and xacro. When I ran the apt commands to install these, they got placed in /opt/ros/foxy, not the home location mentioned previously. So when trying to run it was complaining about not finding these newly installed packages. I changed .bashrc to source in /opt/ros/foxy/setup.bash instead and got it working. I'm just not sure that's the best permanent fix as there seems to be some items in ~/ros2_foxy that are still needed and not present in /opt/ros/foxy.
So the question is what is the difference between these two ROS install locations? Do you need both or one or the other? If ~/ros2_foxy is indeed the preferred location, how do I install new packages like joint state publisher or xacro into this directory rather than /opt/ros/foxy?
Thanks for the help, -Gavin