Catkin generates working setup.bash, but broken

asked 2021-05-28 18:29:28 -0500

rgov gravatar image

updated 2021-05-28 18:35:45 -0500

The following command creates a new Bash shell with an empty environment, loads the workspace's setup.bash, and then executes roslaunch. It works.

$ env -i /bin/bash -c "cd /home/user/myproject; . ./devel/setup.bash; roslaunch myproject myproject.launch"

But if we use sh instead of Bash, it does not:

$ env -i /bin/sh -c "cd /home/user/myproject; . ./devel/; roslaunch myproject myproject.launch"
RLException: [myproject.launch] is neither a launch file in package [myproject] nor is [myproject] a launch file name

If we diff the two environments set up by and setup.bash, we have several differences, including this key one:


Yet even after cleaning and rebuilding from scratch, this issue persists. What is causing it?

This is Ubuntu 18.04 with ROS Melodic on arm64, and

$ catkin --version
catkin_tools 0.6.1 (C) 2014-2021 Open Source Robotics Foundation
catkin_tools is released under the Apache License, Version 2.0 (
Using Python 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0]
edit retag flag offensive close merge delete



Possibly related to this 5 year old (!) bug:

rgov gravatar image rgov  ( 2021-05-28 18:48:36 -0500 )edit