Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install/setup.bash in overlay workspace does not source /opt/ros/<distro> from Debian packages #653

Closed
Karsten1987 opened this Issue Jan 29, 2019 · 3 comments

Comments

Projects
None yet
4 participants
@Karsten1987
Copy link

Karsten1987 commented Jan 29, 2019

Bug report

When working with the binary installation and a custom overlay workspace on top of it, sourcing the setup.bash of the overlay workspace does not recursively source the binary installation.

Required Info:

  • Operating System:
    • Ubuntu 18.04
  • Installation type:
    • binaries with custom overlay workspace
  • Version or commit hash:
    • latest binaries (crystal)

Steps to reproduce issue

Steps are inspired from this Dockerfile

sudo apt-get install ros-crystal-desktop  #install binaries
mkdir -p ~/ros2_overlay/src
cd $_
git clone <repo name>
cd -
source /opt/ros/crystal/setup.bash
colcon build

in a fresh terminal now:

cd ~/ros2_overlay
source install/setup.bash
ros2

Expected behavior

ros2 entry point found

usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...

ros2 is an extensible command-line tool for ROS 2.

optional arguments:
  -h, --help            show this help message and exit

Commands:
  daemon  Various daemon related sub-commands

  Call `ros2 <command> -h` for more detailed usage.

Actual behavior

ros2 is not found, meaning the binaries workspace was not recursively sourced when sourcing the workspace install setup.bash

bash: ros2: command not found

Additional information

When sourcing the binary workspace /opt/ros/crystal/setup.bash beforehand (manually) followed by sourcing the workspace it works fine.

Also when compiling everything from source, the chaining of workspaces works as expected. I believe something during the packaging process might prevent this functionality.

@Karsten1987 Karsten1987 added the bug label Jan 29, 2019

@Karsten1987 Karsten1987 changed the title install.sh in overlay workspace does not source binaries install/setup.bash in overlay workspace does not source binaries Jan 29, 2019

@dirk-thomas

This comment has been minimized.

Copy link
Member

dirk-thomas commented Jan 29, 2019

The prefix level setup files generated by colcon in the overlay workspace only consider workspaces listed in the COLCON_PREFIX_PATH environment variable. Since the Debian packages under /opt/ros/... are not being built by colcon they don't set that environment variable - only AMENT_PREFIX_PATH.

That is also the reason why it works when the underlay workspace was built locally with colcon and only fails with the Debian packages.

I am not sure what the best long term solution for this is atm but as a short term fix I would suggest to add an environment hook to the ros_workspace package which sets COLCON_PREFIX_PATH to the same value as AMENT_PREFIX_PATH.

@codebot

This comment has been minimized.

Copy link
Member

codebot commented Feb 4, 2019

Thanks for looking into this. I'm in the same situation as @Karsten1987 👍

@dirk-thomas dirk-thomas changed the title install/setup.bash in overlay workspace does not source binaries install/setup.bash in overlay workspace does not source /opt/ros/<distro> from Debian packages Feb 7, 2019

@dirk-thomas

This comment has been minimized.

Copy link
Member

dirk-thomas commented Feb 7, 2019

Addressed by ros2/ros_workspace#11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.