Skip to content

Commit

Permalink
yocto_recipe.py: Override the build_type from catkin_pkg in some cases (
Browse files Browse the repository at this point in the history
#267)

* if get_build_type() returns 'catkin' and we're generating some ROS 2 distribution
  change it to 'ament_cmake' and show an error message

* there are couple cases where <export><build_type> is missing completely
  and then catkin_pkg get_build_type() will return the default value as
  'catkin' as specified in
  https://www.ros.org/reps/rep-0149.html#build-type-multiple
  "If no <build_type> is provided, catkin is assumed."
  but this assumption doesn't work for ROS 2 distributions and in meta-ros
  we had to override these cases (as of 2020-12-05):

  dashing:
    https://raw.github.com/ros2-gbp/async_web_server_cpp-release/release/dashing/async_web_server_cpp/1.0.0-1/package.xml
    https://raw.github.com/boschresearch/fmilibrary_vendor-release/release/dashing/fmilibrary_vendor/0.2.0-1/package.xml
    https://raw.github.com/ros-geographic-info/geographic_info-release/release/dashing/geographic_info/1.0.1-1/package.xml
    https://raw.github.com/swri-robotics-gbp/gps_umd-release/release/dashing/gps_umd/1.0.4-1/package.xml
    https://raw.github.com/ros2-gbp/web_video_server-release/release/dashing/web_video_server/1.0.0-1/package.xml
    https://raw.github.com/KIT-MRT/mrt_cmake_modules-release/release/dashing/mrt_cmake_modules/1.0.8-1/package.xml

  eloquent:
    https://raw.github.com/boschresearch/fmilibrary_vendor-release/release/eloquent/fmilibrary_vendor/0.2.0-1/package.xml
    https://raw.github.com/ros-geographic-info/geographic_info-release/release/eloquent/geographic_info/1.0.1-1/package.xml
    https://raw.github.com/swri-robotics-gbp/gps_umd-release/release/eloquent/gps_umd/1.0.2-1/package.xml

  foxy:
    https://raw.github.com/boschresearch/fmilibrary_vendor-release/release/foxy/fmilibrary_vendor/0.2.0-1/package.xml
    https://raw.github.com/swri-robotics-gbp/gps_umd-release/release/foxy/gps_umd/1.0.4-1/package.xml
    https://raw.github.com/KIT-MRT/mrt_cmake_modules-release/release/foxy/mrt_cmake_modules/1.0.8-1/package.xml

  rolling:
    https://raw.github.com/ros2-gbp/fmilibrary_vendor-release/release/rolling/fmilibrary_vendor/0.2.0-2/package.xml
    https://raw.github.com/ros2-gbp/gps_umd-release/release/rolling/gps_umd/1.0.3-2/package.xml

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
  • Loading branch information
shr-project authored and herb-kuta-lge committed Dec 12, 2020
1 parent ab0a072 commit 6fc64c6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion superflore/generators/bitbake/yocto_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,15 @@ def __init__(
self.license = pkg_fields.upstream_license
self.description = pkg_fields.description
self.homepage = pkg_fields.homepage
self.build_type = pkg_fields.build_type
pkg_build_type = pkg_fields.build_type
if pkg_build_type == 'catkin' and \
yoctoRecipe._get_ros_version(rosdistro.name) == 2:
err("Package " + pkg_name + " either doesn't have <export>"
"<build_type> element at all or it's set to 'catkin'"
" which isn't a valid option for ROS 2; changing it to"
" 'ament_cmake'")
pkg_build_type = 'ament_cmake'
self.build_type = pkg_build_type
else:
self.description = ''
self.license = None
Expand Down

0 comments on commit 6fc64c6

Please # to comment.