summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShankho Boron Ghosh <shankhoghosh123@gmail.com>2021-08-13 18:41:32 +0530
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-10-18 10:53:46 +0000
commit098325d668eb2096dcd810bd24b25c81e24500db (patch)
tree582d634c6826ebab4e00b310cdeb2fa251818fa0
parent8310c09541833f8a5d7f580830f63989a9789257 (diff)
meta-agl-ros2: Support for ros2 minimal & ydlidar
v1 : Added support for ros2 in AGL and ydlidar driver support by creation of recipes for ydlidar driver and sdk and packagegroup-agl-ros2-minimal & packagegroup-agl-ros2-ydlidar. Concurrently, created a feature template to allow for BBLAYERS and local conf dependencies. v2 : Removed ALLOW_EMPTY_${PN} = "1" and trailing whitespaces. Set AGL_META_PYTHON = "${METADIR}/external/meta-openembedded/meta-python" otherwise multiple layers might include meta-python and bitbake will choke if a folder is present twice. v3 : Removed trailing whitespaces. Removed AGL_META_PYTHON, just set it. v4 : Rebased v5 : Converted to new syntax: RDEPENDS:${PN}, do_install:append(), IMAGE_INSTALL:append v6 : Added ${METADIR}/meta-agl-devel/meta-agl-ros2 to bblayers configuration. v7 : Added meta-ros-backports-hardknott layer. v8 : Added packagegroup-agl-ros-native-qt5 to remove dependency to agl-demo. Signed-off-by: Shankho Boron Ghosh <shankhoghosh123@gmail.com> Change-Id: If169fde42e3f51571e2776adc574b7f8437a61fa
-rw-r--r--meta-agl-devel.md3
-rw-r--r--meta-agl-ros2/conf/layer.conf2
-rw-r--r--meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros-native-qt5.bb27
-rw-r--r--meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros2-minimal.bb81
-rw-r--r--meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros2-ydlidar.bb14
-rw-r--r--meta-agl-ros2/recipes-ros2/ydlidar-ros2-driver/ydlidar-ros2-driver_1.0.1.bb62
-rw-r--r--meta-agl-ros2/recipes-ros2/ydlidar-ros2-sdk/ydlidar-ros2-sdk_1.4.7.bb24
-rw-r--r--templates/feature/agl-ros2/50_bblayers.conf.inc19
-rw-r--r--templates/feature/agl-ros2/50_local.conf.inc9
-rw-r--r--templates/feature/agl-ros2/README_feature_agl-ros2.md8
10 files changed, 242 insertions, 7 deletions
diff --git a/meta-agl-devel.md b/meta-agl-devel.md
index 5a1eda22..ee4d0236 100644
--- a/meta-agl-devel.md
+++ b/meta-agl-devel.md
@@ -18,6 +18,7 @@ The `meta-agl-devel` layer contains the following files and sub-layers:
├── meta-agl-devel.md
├── meta-agl-jailhouse
├── meta-agl-lxc
+├── meta-agl-ros2
├── meta-oem-production-readiness
├── meta-speech-framework
├── README.md
@@ -34,6 +35,8 @@ The following list provides a summary of these sub-layers:
* `meta-agl-lxc`: Provides LXC container support and example images.
+* `meta-agl-ros2`: Provides ROS2 and additional YDLIDAR support.
+
* `meta-oem-production-readiness`: Provides libraries and software packages of
IVI product readiness
diff --git a/meta-agl-ros2/conf/layer.conf b/meta-agl-ros2/conf/layer.conf
index 7f155efd..7134bc5e 100644
--- a/meta-agl-ros2/conf/layer.conf
+++ b/meta-agl-ros2/conf/layer.conf
@@ -9,4 +9,4 @@ BBFILE_COLLECTIONS += "aglros2"
BBFILE_PATTERN_aglros2 = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglros2 = "70"
-LAYERSERIES_COMPAT_aglros2 = "dunfell"
+LAYERSERIES_COMPAT_aglros2 = "dunfell" \ No newline at end of file
diff --git a/meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros-native-qt5.bb b/meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros-native-qt5.bb
new file mode 100644
index 00000000..28e3976b
--- /dev/null
+++ b/meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros-native-qt5.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Qt5 for native GUI framework of AGL IVI profile"
+DESCRIPTION = "A set of Qt5 packages which required by Native App Fw Subsystem"
+
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-ros-native-qt5 \
+ "
+
+RDEPENDS:${PN} += "\
+ qtbase \
+ qtbase-dev \
+ qtbase-plugins \
+ qtbase-staticdev \
+ qtbase-tools \
+ qtdeclarative \
+ qtdeclarative-qmlplugins \
+ qtdeclarative-tools \
+ qtcharts \
+ qtwayland \
+ qtwayland-plugins \
+ qtwayland-tools \
+ qtgraphicaleffects-qmlplugins \
+ qtvirtualkeyboard \
+ " \ No newline at end of file
diff --git a/meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros2-minimal.bb b/meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros2-minimal.bb
new file mode 100644
index 00000000..0644ec5c
--- /dev/null
+++ b/meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros2-minimal.bb
@@ -0,0 +1,81 @@
+DESCRIPTION = "The minimal set of packages required to ROS2"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-ros2-minimal \
+ "
+
+RDEPENDS:${PN} += " \
+ action-msgs \
+ ament-cmake \
+ ament-index-cpp \
+ ament-index-python \
+ ament-package \
+ builtin-interfaces \
+ class-loader \
+ composition-interfaces \
+ console-bridge-vendor \
+ fastrtps \
+ foonathan-memory-vendor \
+ geometry-msgs \
+ launch \
+ launch-ros \
+ libstatistics-collector \
+ libyaml-vendor \
+ lifecycle-msgs \
+ message-filters \
+ osrf-pycommon \
+ rcl \
+ rcl-action \
+ rcl-interfaces \
+ rcl-logging-spdlog \
+ rcl-yaml-param-parser \
+ rclcpp \
+ rclcpp-action \
+ rclcpp-components \
+ rclpy \
+ rcpputils \
+ rcutils \
+ rmw \
+ rmw-dds-common \
+ rmw-fastrtps-cpp \
+ rmw-fastrtps-shared-cpp \
+ rmw-implementation \
+ rmw-implementation-cmake \
+ ros-workspace \
+ ros2cli \
+ ros2launch \
+ ros2pkg \
+ ros2topic \
+ rosgraph-msgs \
+ rosidl-adapter \
+ rosidl-cmake \
+ rosidl-default-runtime \
+ rosidl-generator-c \
+ rosidl-generator-py \
+ rosidl-parser \
+ rosidl-runtime-c \
+ rosidl-runtime-cpp \
+ rosidl-runtime-py \
+ rosidl-typesupport-c \
+ rosidl-typesupport-cpp \
+ rosidl-typesupport-fastrtps-c \
+ rosidl-typesupport-fastrtps-cpp \
+ rosidl-typesupport-interface \
+ rosidl-typesupport-introspection-c \
+ rosidl-typesupport-introspection-cpp \
+ rpyutils \
+ sensor-msgs \
+ spdlog-vendor \
+ statistics-msgs \
+ std-msgs \
+ std-srvs \
+ tf2 \
+ tf2-msgs \
+ tf2-py \
+ tf2-ros \
+ unique-identifier-msgs \
+ visualization-msgs \
+ " \ No newline at end of file
diff --git a/meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros2-ydlidar.bb b/meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros2-ydlidar.bb
new file mode 100644
index 00000000..7fcee019
--- /dev/null
+++ b/meta-agl-ros2/recipes-platform/packagegroups/packagegroup-agl-ros2-ydlidar.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "Support of ydlidar with ROS2"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-agl-ros2-ydlidar \
+ "
+
+ALLOW_EMPTY_${PN} = "1"
+
+RDEPENDS:${PN} += " \
+ ydlidar-ros2-driver \
+ " \ No newline at end of file
diff --git a/meta-agl-ros2/recipes-ros2/ydlidar-ros2-driver/ydlidar-ros2-driver_1.0.1.bb b/meta-agl-ros2/recipes-ros2/ydlidar-ros2-driver/ydlidar-ros2-driver_1.0.1.bb
new file mode 100644
index 00000000..cff912d0
--- /dev/null
+++ b/meta-agl-ros2/recipes-ros2/ydlidar-ros2-driver/ydlidar-ros2-driver_1.0.1.bb
@@ -0,0 +1,62 @@
+inherit ros_distro_foxy
+inherit ros_superflore_generated
+
+SUMMARY = "YDLIDAR"
+DESCRIPTION = "YDLIDAR driver recipe for ROS2 support."
+AUTHOR = "Shankho Boron Ghosh"
+ROS_AUTHOR = "Shankho Boron Ghosh"
+HOMEPAGE = "https://wiki.ros.org"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d41d8cd98f00b204e9800998ecf8427e"
+
+ROS_CN = "ydlidar_ros2_driver"
+ROS_BPN = "ydlidar_ros2_driver"
+
+ROS_BUILD_DEPENDS = " \
+ rclcpp \
+ rclcpp-components \
+ sensor-msgs \
+ visualization-msgs \
+ geometry-msgs \
+ std-srvs \
+"
+
+ROS_BUILDTOOL_DEPENDS = " \
+ ament-cmake-auto-native \
+ ament-cmake-ros-native \
+"
+
+ROS_EXPORT_DEPENDS = ""
+
+ROS_BUILDTOOL_EXPORT_DEPENDS = ""
+
+ROS_EXEC_DEPENDS = " \
+ rclcpp \
+ rclcpp-components \
+ sensor-msgs \
+ visualization-msgs \
+ geometry-msgs \
+ std-srvs \
+"
+
+# Currently informational only -- see http://www.ros.org/reps/rep-0149.html#dependency-tags.
+ROS_TEST_DEPENDS = ""
+
+DEPENDS = "${ROS_BUILD_DEPENDS} ${ROS_BUILDTOOL_DEPENDS}"
+# Bitbake doesn't support the "export" concept, so build them as if we needed them to build this package (even though we actually
+# don't) so that they're guaranteed to have been staged should this package appear in another's DEPENDS.
+DEPENDS += "${ROS_EXPORT_DEPENDS} ${ROS_BUILDTOOL_EXPORT_DEPENDS}"
+#added
+DEPENDS += "ydlidar-ros2-sdk"
+
+RDEPENDS:${PN} += "${ROS_EXEC_DEPENDS}"
+
+#ROS_BRANCH ?= "branch=release/foxy/ydlidar_ros2_driver"
+SRC_URI = "git://github.com/YDLIDAR/ydlidar_ros2_driver;branch=master;protocol=https"
+SRCREV = "2e095da315aec0a0bc5aaac12082cb9d1f97f8b5"
+S = "${WORKDIR}/git"
+
+ROS_BUILD_TYPE = "ament_cmake"
+
+inherit ros_${ROS_BUILD_TYPE} \ No newline at end of file
diff --git a/meta-agl-ros2/recipes-ros2/ydlidar-ros2-sdk/ydlidar-ros2-sdk_1.4.7.bb b/meta-agl-ros2/recipes-ros2/ydlidar-ros2-sdk/ydlidar-ros2-sdk_1.4.7.bb
new file mode 100644
index 00000000..4f586f30
--- /dev/null
+++ b/meta-agl-ros2/recipes-ros2/ydlidar-ros2-sdk/ydlidar-ros2-sdk_1.4.7.bb
@@ -0,0 +1,24 @@
+SUMMARY = "YDLIDAR-SDK"
+DESCRIPTION = "YDLIDAR-SDK as it a dependency for ydlidar_ros2_driver."
+AUTHOR = "Shankho Boron Ghosh"
+ROS_AUTHOR = "Shankho Boron Ghosh"
+HOMEPAGE = "https://github.com/YDLIDAR/YDLIDAR/YDLidar-SDK"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4e320231d59c825e45dbfda066af29c9"
+
+SRC_URI = "git://github.com/YDLIDAR/YDLidar-SDK.git;protocol=https"
+
+SRCREV = "8b287ed831db0892f51793650b438790442fa09c"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+FILES_${PN} += "${datadir} ${prefix}/startup"
+
+do_install:append() {
+ sed -i -e 's|${DEBUG_PREFIX_MAP}||g; s|--sysroot=${STAGING_DIR_TARGET}||g' ${D}${libdir}/pkgconfig/*.pc
+}
+
+RDEPENDS:${PN} += "bash" \ No newline at end of file
diff --git a/templates/feature/agl-ros2/50_bblayers.conf.inc b/templates/feature/agl-ros2/50_bblayers.conf.inc
index 4c9d7ff5..4f011f86 100644
--- a/templates/feature/agl-ros2/50_bblayers.conf.inc
+++ b/templates/feature/agl-ros2/50_bblayers.conf.inc
@@ -1,6 +1,17 @@
# agl-ros2
-BBLAYERS =+ " \
- ${METADIR}/meta-agl-devel/meta-agl-ros2 \
-"
-# PLACEHOLDER
+# Layer dependencies for meta-ros2
+# Add meta-ros layers : https://growupboron.github.io/blog/gsoc-weekly-update-week-2/
+# Add ydlidar-drivers : https://growupboron.github.io/blog/gsoc-weekly-update-week-4/
+
+AGL_META_PYTHON = "${METADIR}/external/meta-openembedded/meta-python"
+
+BBLAYERS =+ " \
+ ${METADIR}/external/meta-ros/meta-ros-common \
+ ${METADIR}/external/meta-ros/meta-ros-backports-gatesgarth \
+ ${METADIR}/external/meta-ros/meta-ros-backports-hardknott \
+ ${METADIR}/external/meta-ros/meta-ros2 \
+ ${METADIR}/external/meta-ros/meta-ros2-foxy \
+ ${METADIR}/external/meta-qt5 \
+ ${METADIR}/meta-agl-devel/meta-agl-ros2 \
+ " \ No newline at end of file
diff --git a/templates/feature/agl-ros2/50_local.conf.inc b/templates/feature/agl-ros2/50_local.conf.inc
index dedf7217..4ffa2cd1 100644
--- a/templates/feature/agl-ros2/50_local.conf.inc
+++ b/templates/feature/agl-ros2/50_local.conf.inc
@@ -1,3 +1,8 @@
# agl-ros2
-#
-# PLACEHOLDER
+
+# Contains minimal ros2 feature that is neccesary to run YDLIDAR drivers.
+IMAGE_INSTALL:append = " packagegroup-agl-ros2-minimal"
+IMAGE_INSTALL:append = " packagegroup-agl-ros2-ydlidar"
+
+# Adds Qt support to the built image
+IMAGE_INSTALL:append = " packagegroup-agl-ros-native-qt5" \ No newline at end of file
diff --git a/templates/feature/agl-ros2/README_feature_agl-ros2.md b/templates/feature/agl-ros2/README_feature_agl-ros2.md
new file mode 100644
index 00000000..8c7eccd5
--- /dev/null
+++ b/templates/feature/agl-ros2/README_feature_agl-ros2.md
@@ -0,0 +1,8 @@
+---
+description: Feature agl-ros2
+authors: Shankho Boron Ghosh <shankhoghosh123@gmail.com>
+---
+
+### Feature agl-ros2
+
+Enables building of meta-ros2-foxy layer with additional support for YDLIDAR drivers. \ No newline at end of file