Stretch robot installation error [Ubuntu 20.04]

I installed ubuntu 20.04 today and performed the robot installation steps following this. The installation failed at CREATE GALACTIC AMENT WORKSPACE at /home/hello-robot/ament_ws. It seems to fail at the stretch_navigation package:

--- stderr: stretch_navigation
CMake Error at cmake_install.cmake:49 (file):
  file INSTALL cannot find
  "/home/hello-robot/ament_ws/src/stretch_ros2/stretch_navigation/map": No
  such file or directory.

I have attached the detailed logs here.

Hey @srama2512, thank you for reporting this issue. It was a result of an erroneous addition of the map directory to the CMakelists.txt file of the stretch_navigation package. This has now been corrected.

Seeing as you were performing a new robot install, please run the following steps to create a fresh ament_ws:

cd ~/stretch_install

Have a look at the creating a new workspace guide to know more.


Thanks, @chintujaguar ! This did the trick. I got the “conflicting ROS version sourced” error as mentioned in the troubleshooting section. I successfully installed after commenting out the setup.bash commands in bashrc. Should I uncomment them now?

1 Like

@srama2512, glad to know that the installation was successful.

You should only uncomment the source commands for the ROS distro you want to use. For example, if you want to use ROS Noetic, your .bashrc setup would look like this:

source /opt/ros/noetic/setup.bash
# source /opt/ros/galactic/setup.bash
source ~/catkin_ws/devel/setup.bash
# source ~/ament_ws/install/setup.bash

Conversely, if you want to work with ROS 2 Galactic, your .bashrc setup would look like this:

# source /opt/ros/noetic/setup.bash
source /opt/ros/galactic/setup.bash
# source ~/catkin_ws/devel/setup.bash
source ~/ament_ws/install/setup.bash