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

ModuleNotFoundError: No module named 'ament_package' error while compiling ROS2 package with colcon #15

Open
traversaro opened this issue May 12, 2021 · 3 comments

Comments

@traversaro
Copy link
Member

I wanted to start testing the ROS2 packages by building a simple package (from https://github.com/robotology-playground/yarp-ros2), but compilation is failing.

Installation process

conda create -n ros2env python=3.8
conda activate ros2env
# this adds the conda-forge channel to your persistent configuration in ~/.condarc
conda config --env --add channels conda-forge
# and the robostack channel
conda config --env --add channels robostack
# it's very much advised to use strict channel priority
conda config --env --set channel_priority strict

mamba install ros-foxy-base
mamba install compilers cmake pkg-config colcon-common-extensions

conda deactivate
conda activate ros2env

Build command

git clone https://github.com/robotology-playground/yarp-ros2
cd yarp-ros2/ros2_interfaces_ws
colcon build --packages-select map2d_nws_ros2_msgs

Build error

(ros2env) traversaro@IITICUBLAP102:~/yarp-ros2/ros2_interfaces_ws$ colcon build --packages-select map2d_nws_ros2_msgs
Starting >>> map2d_nws_ros2_msgs
--- stderr: map2d_nws_ros2_msgs
Traceback (most recent call last):
  File "/home/traversaro/mambaforge/envs/ros2env/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py", line 21, in <module>
    from ament_package.templates import get_environment_hook_template_path
ModuleNotFoundError: No module named 'ament_package'
CMake Error at /home/traversaro/mambaforge/envs/ros2env/share/ament_cmake_core/cmake/ament_cmake_package_templates-extras.cmake:41 (message):
  execute_process(/home/traversaro/mambaforge/bin/python3
  /home/traversaro/mambaforge/envs/ros2env/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py
  /home/traversaro/yarp-ros2/ros2_interfaces_ws/build/map2d_nws_ros2_msgs/ament_cmake_package_templates/templates.cmake)  returned error code 1
Call Stack (most recent call first):
  /home/traversaro/mambaforge/envs/ros2env/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake:41 (include)
  /home/traversaro/mambaforge/envs/ros2env/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake:15 (find_package)
  /home/traversaro/mambaforge/envs/ros2env/share/ament_cmake/cmake/ament_cmakeConfig.cmake:41 (include)
  CMakeLists.txt:19 (find_package)


---
Failed   <<< map2d_nws_ros2_msgs [0.08s, exited with code 1]

Summary: 0 packages finished [0.24s]
  1 package failed: map2d_nws_ros2_msgs
  1 package had stderr output: map2d_nws_ros2_msgs

Notes

Note that ros-foxy-ament-package is correctly installed, and if I open a python interpreter and run from ament_package.templates import get_environment_hook_template_path it works fine, so probably the issue is that a new Python interpreter that is not correctly configured is launched, or something similar.

Complete environment

(ros2env) traversaro@IITICUBLAP102:~/yarp-ros2/ros2_interfaces_ws$ conda list
# packages in environment at /home/traversaro/mambaforge/envs/ros2env:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
binutils                  2.35.1               hdd6e379_2    conda-forge
binutils_impl_linux-64    2.35.1               h193b22a_2    conda-forge
binutils_linux-64         2.35                h67ddf6f_30    conda-forge
bullet                    2.88            py38hb3f55d8_1001    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.17.1               h7f98852_1    conda-forge
c-compiler                1.1.3                h7f98852_0    conda-forge
ca-certificates           2020.12.5            ha878542_0    conda-forge
catkin_pkg                0.4.23             pyh9f0ad1d_0    conda-forge
certifi                   2020.12.5        py38h578d9bd_1    conda-forge
cffi                      1.14.5           py38ha65f79e_0    conda-forge
cmake                     3.19.4               h4547794_0    conda-forge
colcon-cmake              0.2.26                     py_0    conda-forge
colcon-common-extensions  0.2.1            py38h578d9bd_2    conda-forge
colcon-core               0.6.1            py38h578d9bd_1    conda-forge
colcon-defaults           0.2.5                      py_0    conda-forge
colcon-devtools           0.2.2                      py_0    conda-forge
colcon-library-path       0.2.1                      py_0    conda-forge
colcon-metadata           0.2.5                      py_0    conda-forge
colcon-output             0.2.12                     py_0    conda-forge
colcon-package-information 0.3.3                      py_0    conda-forge
colcon-package-selection  0.2.10                     py_0    conda-forge
colcon-parallel-executor  0.2.4                      py_0    conda-forge
colcon-pkg-config         0.1.0                      py_0    conda-forge
colcon-powershell         0.3.6                      py_0    conda-forge
colcon-python-setup-py    0.2.7                      py_0    conda-forge
colcon-recursive-crawl    0.2.1                      py_0    conda-forge
colcon-ros                0.3.21                     py_0    conda-forge
colcon-test-result        0.3.8                      py_0    conda-forge
compilers                 1.1.3                ha770c72_0    conda-forge
console_bridge            1.0.1                h4bd325d_0    conda-forge
coverage                  5.5              py38h497a2fe_0    conda-forge
cppcheck                  2.4.1            py38hbffb2f6_0    conda-forge
cryptography              3.4.7            py38ha5dfef3_0    conda-forge
cxx-compiler              1.1.3                h4bd325d_0    conda-forge
distlib                   0.3.1              pyh9f0ad1d_0    conda-forge
distro                    1.5.0              pyh9f0ad1d_0    conda-forge
docutils                  0.17.1           py38h578d9bd_0    conda-forge
eigen                     3.3.9                h4bd325d_1    conda-forge
empy                      3.3.4              pyh9f0ad1d_1    conda-forge
expat                     2.3.0                h9c3ff4c_0    conda-forge
flake8                    3.9.2              pyhd8ed1ab_0    conda-forge
fortran-compiler          1.1.3                h1990efc_0    conda-forge
gcc_impl_linux-64         9.3.0               h70c0ae5_19    conda-forge
gcc_linux-64              9.3.0               hf25ea35_30    conda-forge
gfortran_impl_linux-64    9.3.0               hc4a2995_19    conda-forge
gfortran_linux-64         9.3.0               hdc58fab_30    conda-forge
gmock                     1.10.0               h4bd325d_7    conda-forge
gtest                     1.10.0               h4bd325d_7    conda-forge
gxx_impl_linux-64         9.3.0               hd87eabc_19    conda-forge
gxx_linux-64              9.3.0               h3fbe746_30    conda-forge
icu                       68.1                 h58526e2_0    conda-forge
ifcfg                     0.21                       py_0    conda-forge
importlib-metadata        4.0.1            py38h578d9bd_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
kernel-headers_linux-64   2.6.32              h77966d4_13    conda-forge
krb5                      1.17.2               h926e7f8_0    conda-forge
lark-parser               0.11.3             pyhd8ed1ab_0    conda-forge
ld_impl_linux-64          2.35.1               hea4e1c9_2    conda-forge
libblas                   3.9.0                9_openblas    conda-forge
libcblas                  3.9.0                9_openblas    conda-forge
libcurl                   7.76.1               hc4aaa36_1    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.3                  h58526e2_2    conda-forge
libgcc-devel_linux-64     9.3.0               h7864c58_19    conda-forge
libgcc-ng                 9.3.0               h2828fa1_19    conda-forge
libgfortran-ng            9.3.0               hff62375_19    conda-forge
libgfortran5              9.3.0               hff62375_19    conda-forge
libgomp                   9.3.0               h2828fa1_19    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0                9_openblas    conda-forge
libnghttp2                1.43.0               h812cca2_0    conda-forge
libopenblas               0.3.15          pthreads_h8fe5266_0    conda-forge
libssh2                   1.9.0                ha56f1ee_6    conda-forge
libstdcxx-devel_linux-64  9.3.0               hb016644_19    conda-forge
libstdcxx-ng              9.3.0               h6de172a_19    conda-forge
libuv                     1.41.0               h7f98852_0    conda-forge
libxml2                   2.9.10               h72842e0_4    conda-forge
libxslt                   1.1.33               h15afd5d_2    conda-forge
lxml                      4.6.3            py38hf1fe3a4_0    conda-forge
lz4-c                     1.9.2                he1b5a44_3    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mock                      4.0.3            py38h578d9bd_1    conda-forge
more-itertools            8.7.0              pyhd8ed1ab_1    conda-forge
ncurses                   6.2                  h58526e2_4    conda-forge
netifaces                 0.10.9          py38h497a2fe_1003    conda-forge
numpy                     1.14.6          py38h95a1406_1201    conda-forge
openssl                   1.1.1k               h7f98852_0    conda-forge
packaging                 20.9               pyh44b312d_0    conda-forge
pcre                      8.44                 he1b5a44_0    conda-forge
pip                       21.1.1             pyhd8ed1ab_0    conda-forge
pkg-config                0.29.2            h36c2ea0_1008    conda-forge
pluggy                    0.13.1           py38h578d9bd_4    conda-forge
py                        1.10.0             pyhd3deb0d_0    conda-forge
pycodestyle               2.7.0              pyhd8ed1ab_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pydocstyle                6.0.0              pyhd8ed1ab_0    conda-forge
pyflakes                  2.3.1              pyhd8ed1ab_0    conda-forge
pygments                  2.9.0              pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pytest                    6.2.4            py38h578d9bd_0    conda-forge
pytest-cov                2.11.1             pyh44b312d_0    conda-forge
pytest-repeat             0.8.0                      py_0    conda-forge
pytest-rerunfailures      9.1.1                      py_0    conda-forge
pytest-runner             5.3.0              pyh44b312d_0    conda-forge
python                    3.8.10          h49503c6_1_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.8                      1_cp38    conda-forge
pyyaml                    5.4.1            py38h497a2fe_0    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
rhash                     1.4.1                h7f98852_0    conda-forge
ros-foxy-action-msgs      1.0.0            py38h348cfbe_0    robostack
ros-foxy-actionlib-msgs   2.0.3            py38h348cfbe_0    robostack
ros-foxy-ament-cmake      0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-auto 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-copyright 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-core 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-cppcheck 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-cpplint 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-export-definitions 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-export-dependencies 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-export-include-directories 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-export-interfaces 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-export-libraries 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-export-link-flags 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-export-targets 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-flake8 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-gmock 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-gtest 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-include-directories 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-libraries 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-lint-cmake 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-pep257 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-pytest 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-python 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-ros  0.9.0            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-target-dependencies 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-test 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-uncrustify 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-version 0.9.8            py38h348cfbe_0    robostack
ros-foxy-ament-cmake-xmllint 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-copyright  0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-cppcheck   0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-cpplint    0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-flake8     0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-index-cpp  1.0.1            py38h348cfbe_0    robostack
ros-foxy-ament-index-python 1.0.1            py38h348cfbe_0    robostack
ros-foxy-ament-lint       0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-lint-auto  0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-lint-cmake 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-lint-common 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-package    0.9.3            py38h348cfbe_0    robostack
ros-foxy-ament-pep257     0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-uncrustify 0.9.6            py38h348cfbe_0    robostack
ros-foxy-ament-xmllint    0.9.6            py38h348cfbe_0    robostack
ros-foxy-builtin-interfaces 1.0.0            py38h348cfbe_0    robostack
ros-foxy-class-loader     2.0.1            py38h3dbb906_0    robostack
ros-foxy-common-interfaces 2.0.3            py38h348cfbe_0    robostack
ros-foxy-composition-interfaces 1.0.0            py38h348cfbe_0    robostack
ros-foxy-connext-cmake-module 1.0.2            py38h348cfbe_0    robostack
ros-foxy-console-bridge-vendor 1.2.3            py38h3dbb906_0    robostack
ros-foxy-cyclonedds       0.7.0            py38heddcf40_0    robostack
ros-foxy-diagnostic-msgs  2.0.3            py38h348cfbe_0    robostack
ros-foxy-domain-coordinator 0.9.0            py38h348cfbe_0    robostack
ros-foxy-eigen3-cmake-module 0.1.1            py38h348cfbe_0    robostack
ros-foxy-fastcdr          1.0.13           py38h348cfbe_0    robostack
ros-foxy-fastrtps         2.0.2            py38heddcf40_0    robostack
ros-foxy-fastrtps-cmake-module 1.0.2            py38h348cfbe_0    robostack
ros-foxy-foonathan-memory-vendor 1.0.0            py38h348cfbe_0    robostack
ros-foxy-geometry-msgs    2.0.3            py38h348cfbe_0    robostack
ros-foxy-geometry2        0.13.9           py38h348cfbe_0    robostack
ros-foxy-gmock-vendor     1.8.9000         py38h348cfbe_0    robostack
ros-foxy-gtest-vendor     1.8.9000         py38h348cfbe_0    robostack
ros-foxy-kdl-parser       2.4.1            py38h348cfbe_0    robostack
ros-foxy-launch           0.10.4           py38h348cfbe_0    robostack
ros-foxy-launch-ros       0.11.1           py38h348cfbe_0    robostack
ros-foxy-launch-testing   0.10.4           py38h348cfbe_0    robostack
ros-foxy-launch-testing-ament-cmake 0.10.4           py38h348cfbe_0    robostack
ros-foxy-launch-testing-ros 0.11.1           py38h348cfbe_0    robostack
ros-foxy-launch-xml       0.10.4           py38h348cfbe_0    robostack
ros-foxy-launch-yaml      0.10.4           py38h348cfbe_0    robostack
ros-foxy-libstatistics-collector 1.0.1            py38h348cfbe_0    robostack
ros-foxy-libyaml-vendor   1.0.2            py38h348cfbe_0    robostack
ros-foxy-lifecycle-msgs   1.0.0            py38h348cfbe_0    robostack
ros-foxy-message-filters  3.2.5            py38h348cfbe_0    robostack
ros-foxy-nav-msgs         2.0.3            py38h348cfbe_0    robostack
ros-foxy-orocos-kdl       3.3.1            py38h348cfbe_0    robostack
ros-foxy-osrf-pycommon    0.1.10           py38h348cfbe_0    robostack
ros-foxy-pluginlib        2.5.3            py38h348cfbe_0    robostack
ros-foxy-python-cmake-module 0.8.0            py38h348cfbe_0    robostack
ros-foxy-rcl              1.1.10           py38h348cfbe_0    robostack
ros-foxy-rcl-action       1.1.10           py38h348cfbe_0    robostack
ros-foxy-rcl-interfaces   1.0.0            py38h348cfbe_0    robostack
ros-foxy-rcl-lifecycle    1.1.10           py38h348cfbe_0    robostack
ros-foxy-rcl-logging-spdlog 1.0.1            py38h348cfbe_0    robostack
ros-foxy-rcl-yaml-param-parser 1.1.10           py38h348cfbe_0    robostack
ros-foxy-rclcpp           2.3.0            py38h348cfbe_0    robostack
ros-foxy-rclcpp-action    2.3.0            py38h348cfbe_0    robostack
ros-foxy-rclcpp-components 2.3.0            py38h348cfbe_0    robostack
ros-foxy-rclcpp-lifecycle 2.3.0            py38h348cfbe_0    robostack
ros-foxy-rclpy            1.0.5            py38h348cfbe_0    robostack
ros-foxy-rcpputils        1.3.1            py38h348cfbe_0    robostack
ros-foxy-rcutils          1.1.2            py38h348cfbe_0    robostack
ros-foxy-rmw              1.0.2            py38h348cfbe_0    robostack
ros-foxy-rmw-connext-cpp  1.0.3            py38h348cfbe_0    robostack
ros-foxy-rmw-connext-shared-cpp 1.0.3            py38h348cfbe_0    robostack
ros-foxy-rmw-cyclonedds-cpp 0.7.6            py38h348cfbe_0    robostack
ros-foxy-rmw-dds-common   1.0.2            py38h348cfbe_0    robostack
ros-foxy-rmw-fastrtps-cpp 1.2.4            py38h348cfbe_0    robostack
ros-foxy-rmw-fastrtps-shared-cpp 1.2.4            py38h348cfbe_0    robostack
ros-foxy-rmw-implementation 1.0.1            py38h348cfbe_0    robostack
ros-foxy-rmw-implementation-cmake 1.0.2            py38h348cfbe_0    robostack
ros-foxy-robot-state-publisher 2.4.1            py38h348cfbe_0    robostack
ros-foxy-ros-base         0.9.2            py38h348cfbe_0    robostack
ros-foxy-ros-core         0.9.2            py38h348cfbe_0    robostack
ros-foxy-ros-environment  2.5.0            py38h348cfbe_0    robostack
ros-foxy-ros2action       0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2bag          0.3.6            py38h348cfbe_0    robostack
ros-foxy-ros2cli          0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2component    0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2doctor       0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2interface    0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2launch       0.11.1           py38h348cfbe_0    robostack
ros-foxy-ros2lifecycle    0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2multicast    0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2node         0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2param        0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2pkg          0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2run          0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2service      0.9.8            py38h348cfbe_0    robostack
ros-foxy-ros2topic        0.9.8            py38h348cfbe_0    robostack
ros-foxy-rosbag2          0.3.6            py38h348cfbe_0    robostack
ros-foxy-rosbag2-compression 0.3.6            py38h348cfbe_0    robostack
ros-foxy-rosbag2-converter-default-plugins 0.3.6            py38h348cfbe_0    robostack
ros-foxy-rosbag2-cpp      0.3.6            py38h348cfbe_0    robostack
ros-foxy-rosbag2-storage  0.3.6            py38h348cfbe_0    robostack
ros-foxy-rosbag2-storage-default-plugins 0.3.6            py38h348cfbe_0    robostack
ros-foxy-rosbag2-transport 0.3.6            py38h348cfbe_0    robostack
ros-foxy-rosgraph-msgs    1.0.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-adapter   1.2.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-cmake     1.2.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-default-generators 1.0.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-default-runtime 1.0.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-generator-c 1.2.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-generator-cpp 1.2.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-generator-dds-idl 0.7.1            py38h348cfbe_0    robostack
ros-foxy-rosidl-generator-py 0.9.4            py38h27dcbf6_0    robostack
ros-foxy-rosidl-parser    1.2.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-runtime-c 1.2.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-runtime-cpp 1.2.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-runtime-py 0.9.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-typesupport-c 1.0.1            py38h348cfbe_0    robostack
ros-foxy-rosidl-typesupport-connext-c 1.0.2            py38h348cfbe_0    robostack
ros-foxy-rosidl-typesupport-connext-cpp 1.0.2            py38h348cfbe_0    robostack
ros-foxy-rosidl-typesupport-cpp 1.0.1            py38h348cfbe_0    robostack
ros-foxy-rosidl-typesupport-fastrtps-c 1.0.2            py38h348cfbe_0    robostack
ros-foxy-rosidl-typesupport-fastrtps-cpp 1.0.2            py38h348cfbe_0    robostack
ros-foxy-rosidl-typesupport-interface 1.2.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-typesupport-introspection-c 1.2.0            py38h348cfbe_0    robostack
ros-foxy-rosidl-typesupport-introspection-cpp 1.2.0            py38h348cfbe_0    robostack
ros-foxy-rpyutils         0.2.0            py38h348cfbe_0    robostack
ros-foxy-sensor-msgs      2.0.3            py38h348cfbe_0    robostack
ros-foxy-shape-msgs       2.0.3            py38h348cfbe_0    robostack
ros-foxy-shared-queues-vendor 0.3.6            py38h348cfbe_0    robostack
ros-foxy-spdlog-vendor    1.1.2            py38h348cfbe_0    robostack
ros-foxy-sqlite3-vendor   0.3.6            py38h4dcd288_0    robostack
ros-foxy-sros2            0.9.4            py38h348cfbe_0    robostack
ros-foxy-sros2-cmake      0.9.4            py38h348cfbe_0    robostack
ros-foxy-statistics-msgs  1.0.0            py38h348cfbe_0    robostack
ros-foxy-std-msgs         2.0.3            py38h348cfbe_0    robostack
ros-foxy-std-srvs         2.0.3            py38h348cfbe_0    robostack
ros-foxy-stereo-msgs      2.0.3            py38h348cfbe_0    robostack
ros-foxy-tf2              0.13.9           py38h3dbb906_0    robostack
ros-foxy-tf2-bullet       0.13.9           py38h71fd4cb_0    robostack
ros-foxy-tf2-eigen        0.13.9           py38h348cfbe_0    robostack
ros-foxy-tf2-geometry-msgs 0.13.9           py38h348cfbe_0    robostack
ros-foxy-tf2-kdl          0.13.9           py38h348cfbe_0    robostack
ros-foxy-tf2-msgs         0.13.9           py38h348cfbe_0    robostack
ros-foxy-tf2-py           0.13.9           py38h348cfbe_0    robostack
ros-foxy-tf2-ros          0.13.9           py38h348cfbe_0    robostack
ros-foxy-tf2-sensor-msgs  0.13.9           py38h348cfbe_0    robostack
ros-foxy-tf2-tools        0.13.9           py38h348cfbe_0    robostack
ros-foxy-tinyxml-vendor   0.8.0            py38h348cfbe_0    robostack
ros-foxy-tinyxml2-vendor  0.7.3            py38h348cfbe_0    robostack
ros-foxy-tracetools       1.0.5            py38h348cfbe_0    robostack
ros-foxy-trajectory-msgs  2.0.3            py38h348cfbe_0    robostack
ros-foxy-uncrustify-vendor 1.4.0            py38h348cfbe_0    robostack
ros-foxy-unique-identifier-msgs 2.1.2            py38h348cfbe_0    robostack
ros-foxy-urdf             2.4.0            py38h348cfbe_0    robostack
ros-foxy-urdfdom          2.3.3            py38h3dbb906_0    robostack
ros-foxy-urdfdom-headers  1.0.5            py38h348cfbe_0    robostack
ros-foxy-visualization-msgs 2.0.3            py38h348cfbe_0    robostack
ros-foxy-yaml-cpp-vendor  7.0.2            py38h348cfbe_0    robostack
ros-foxy-zstd-vendor      0.3.6            py38h42ee183_0    robostack
rosdistro                 0.8.3            py38h578d9bd_2    conda-forge
rospkg                    1.3.0              pyhd8ed1ab_1    conda-forge
setuptools                49.6.0           py38h578d9bd_3    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
spdlog                    1.8.5                h4bd325d_0    conda-forge
sqlite                    3.35.5               h74cdb3f_0    conda-forge
sysroot_linux-64          2.12                h77966d4_13    conda-forge
tinyxml                   2.6.2                h4bd325d_2    conda-forge
tinyxml2                  8.0.0                h9c3ff4c_1    conda-forge
tk                        8.6.10               h21135ba_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
uncrustify                0.72.0               h9c3ff4c_0    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
yaml                      0.2.5                h516909a_0    conda-forge
zipp                      3.4.1              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h516909a_1010    conda-forge
zstd                      1.4.4                h6597ccf_3    conda-forge
@wolfv
Copy link
Member

wolfv commented May 12, 2021

Hi, thanks for trying!

Indeed it looks like it chooses the wrong python interpreter:

  execute_process(/home/traversaro/mambaforge/bin/python3
  /home/traversaro/mambaforge/envs/ros2env/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py
  /home/traversaro/yarp-ros2/ros2_interfaces_ws/build/map2d_nws_ros2_msgs/ament_cmake_package_templates/templates.cmake)  returned error code 1

It should read execute_process(/home/traversaro/mambaforge/envs/ros2env/bin/python3 and not mambaforge/bin/python3.

Will have to investigate why this happens. Maybe if you can supply extra-cmake args to colcon a hotfix would be to give the absolute path the python interpreter ($CONDA_PREFIX/bin/python with activated ros2env).

@traversaro
Copy link
Member Author

Good catch, I had missed that. I will check.

@Tobias-Fischer
Copy link
Collaborator

This should be fixed in Galactic / Humble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants