From ca547fb6b07833d86a2736f9381bad80c06bfb23 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Sun, 29 Oct 2023 20:56:25 +0100 Subject: [PATCH] Fix building of ament packages While ROS2 installs python packages into lib/python3.x/site-packages, ROS1 expects them to be in lib/python3/dist-packages. --- ros-one.repos | 34 +++++++++++++++++++++++++++------- src/build.sh | 4 +++- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/ros-one.repos b/ros-one.repos index 1c5eb7e..1b52176 100644 --- a/ros-one.repos +++ b/ros-one.repos @@ -15,6 +15,14 @@ repositories: type: git url: https://github.com/rhaschke/actionlib.git version: noetic-devel + ament_cmake: + type: git + url: https://github.com/ament/ament_cmake.git + version: rolling + ament_package: + type: git + url: https://github.com/ros-o/ament_package.git + version: obese-devel angles: type: git url: https://github.com/ros/angles.git @@ -43,14 +51,14 @@ repositories: type: git url: https://github.com/TAMS-Group/bio_ik.git version: master - boost_sml: - type: git - url: https://github.com/ros-o/boost_sml.git - version: obese-devel bond_core: type: git url: https://github.com/ros-o/bond_core version: obese-devel + boost_sml: + type: git + url: https://github.com/ros-o/boost_sml.git + version: obese-devel catkin: type: git url: https://github.com/ubi-agni/catkin @@ -91,6 +99,10 @@ repositories: type: git url: https://github.com/crigroup/criutils.git version: master + ddynamic_reconfigure: + type: git + url: https://github.com/ros-o/ddynamic_reconfigure.git + version: obese-devel diagnostics: type: git url: https://github.com/ros-o/diagnostics.git @@ -195,6 +207,14 @@ repositories: type: git url: https://github.com/ros-visualization/gl_dependency.git version: kinetic-devel + google_benchmark_vendor: + type: git + url: https://github.com/ament/google_benchmark_vendor.git + version: rolling + googletest: + type: git + url: https://github.com/ament/googletest.git + version: rolling graph_msgs: type: git url: https://github.com/PickNikRobotics/graph_msgs.git @@ -328,9 +348,9 @@ repositories: url: https://github.com/pal-robotics/pal_statistics.git version: kinetic-devel panda_moveit_config: - type: git - url: https://github.com/ros-planning/panda_moveit_config.git - version: noetic-devel + type: git + url: https://github.com/ros-planning/panda_moveit_config.git + version: noetic-devel pcl_msgs: type: git url: https://github.com/ros-perception/pcl_msgs diff --git a/src/build.sh b/src/build.sh index 2de5875..3168b69 100644 --- a/src/build.sh +++ b/src/build.sh @@ -94,10 +94,12 @@ function build_pkg { ici_label "${BLOOM_QUIET[@]}" bloom-generate "${BLOOM_GEN_CMD}" --os-name="$DISTRIBUTION" --os-version="$DEB_DISTRO" --ros-distro="$ROS_DISTRO" || return 2 + # Enable CATKIN_INSTALL_INTO_PREFIX_ROOT for catkin package if [ "$pkg_name" = "catkin" ]; then - # Enable CATKIN_INSTALL_INTO_PREFIX_ROOT for catkin package sed -i 's@-DCATKIN_BUILD_BINARY_PACKAGE="1"@-DCATKIN_INSTALL_INTO_PREFIX_ROOT="1"@' debian/rules fi + # Configure ament python packages to install into lib/python3/dist-packages (instead of lib/python3.x/site-packages) + sed -i 's@lib/{interpreter}/site-packages@lib/python3/dist-packages@' debian/rules # https://github.com/ros-infrastructure/bloom/pull/643 echo 11 > debian/compat