Week 6 :

Add support for YDLIDAR core dependencies layer

  • Edit and update superflore-ros-distro.inc, ros-distro.inc and layer.conf in meta-ros2-foxy layer.

    # Change into recipe directory
    
    $ cd $AGL_TOP/master/external/meta-ros/meta-ros2-foxy/conf/
    $ tree
      ├── layer.conf [x]
      └── ros-distro
          └── include
              └── foxy
                  ├── generated
                  │   ├── superflore-datetime.inc
                  │   └── superflore-ros-distro.inc [x]
                  ├── ros-distro.inc [x]
                  ├── ros-distro-preferred-providers.inc
                  ├── ros-distro-preferred-versions.inc
                  ├── ros-distro-recipe-blacklist.inc
                  └── ros-distro-recipe-blacklist-logs
                      ├── lanelet2-traffic-rules.do_configure
                      ├── mrpt2.do_compile
                      ├── qt-gui-cpp.do_compile
                      └── warehouse-ros-mongo.do_configure
    ## the files marked [x] will be either modified or updated.
    
    # Update superflore-ros-distro.inc
    
    ## https://drive.google.com/file/d/19Dj7P-yCp6Xqaa9h9k2BqdgHUtD-dwe3/view?usp=sharing
    $ touch ros-distro/include/foxy/generated/superflore-ros-distro-core-ydlidar.inc
    $ vim ros-distro/include/foxy/generated/superflore-ros-distro-core-ydlidar.inc
    
      # Edited to contain core dependencies required for ydlidar
    
      # foxy/generated/superflore-ros-distro-core-ydlidar.inc
      # Generated by superflore -- DO NOT EDIT (except ROS_DISTRO_METADATA_VERSION_REVISION)
      #
      # Copyright Open Source Robotics Foundation
    
      # Increment every time meta-ros is released because of a manually created change, ie, NOT as a result of a superflore run (which
      # resets it to "0").
      ROS_DISTRO_METADATA_VERSION_REVISION = "0"
    
      ROS_SUPERFLORE_PROGRAM_VERSION = "0.3.2+19.g4105ad8"
      ROS_SUPERFLORE_GENERATION_SCHEME = "2"
    
      ROS_DISTRO_TYPE = "ros2"
      ROS_VERSION = "2"
      # DO NOT OVERRIDE ROS_PYTHON_VERSION
      ROS_PYTHON_VERSION = "3"
    
      ROS_SUPERFLORE_GENERATION_SKIP_LIST = ""
    
      # Superflore was unable to generate recipes for these packages, eg, because their repositories are not on GitHub.
      ROS_SUPERFLORE_GENERATION_NOT_POSSIBLE = " \
          tracetools \
      "
    
      # Number of commits that will be returned by "git log meta-ros2-foxy/files/foxy/generated/cache.yaml" when the
      # generated files are committed. This is used for the fourth version field of DISTRO_VERSION.
      ROS_NUM_CACHE_YAML_COMMITS = "28"
    
      # Iterated values of ROS_DISTRO-cache.distribution_file.release_platforms.<LINUX-DISTRO>.[ <NAME> ... ] .
      ROS_DISTRO_RELEASE_PLATFORMS = " \
          ubuntu-focal \
      "
    
      ROS_SUPERFLORE_GENERATED_RECIPES = " \
          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 \
          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 \
          ydlidar-ros2-driver \
          rpyutils \
          sensor-msgs \
          spdlog-vendor \
          statistics-msgs \
          std-msgs \
          std-srvs \
          tf2 \
          tf2-msgs \
          tf2-py \
          tf2-ros \
          unique-identifier-msgs \
          visualization-msgs \
      "
    
      ROS_SUPERFLORE_GENERATED_RECIPE_BASENAMES_WITH_COMPONENT = " \
                          rcl-interfaces/action-msgs_1.0.0-1 \
                              ament-index/ament-index-cpp_1.0.2-1 \
                              ament-index/ament-index-python_1.0.2-1 \
                          rcl-interfaces/builtin-interfaces_1.0.0-1 \
                            class-loader/class-loader_2.0.2-1 \
                          rcl-interfaces/composition-interfaces_1.0.0-1 \
                    console-bridge-vendor/console-bridge-vendor_1.2.4-1 \
                                fastrtps/fastrtps_2.0.2-2 \
                  foonathan-memory-vendor/foonathan-memory-vendor_1.0.0-1 \
                        common-interfaces/geometry-msgs_2.0.4-1 \
                  libstatistics-collector/libstatistics-collector_1.0.1-1 \
                          libyaml-vendor/libyaml-vendor_1.0.4-1 \
                          message-filters/message-filters_3.2.5-1 \
                            osrf-pycommon/osrf-pycommon_0.1.10-1 \
                                      rcl/rcl-action_1.1.11-1 \
                          rcl-interfaces/rcl-interfaces_1.0.0-1 \
                              rcl-logging/rcl-logging-spdlog_1.1.0-1 \
                                      rcl/rcl-yaml-param-parser_1.1.11-1 \
                                  rclcpp/rclcpp_2.3.1-1 \
                                  rclcpp/rclcpp-action_2.3.1-1 \
                                  rclcpp/rclcpp-components_2.3.1-1 \
                                    rclpy/rclpy_1.0.5-1 \
                                rcpputils/rcpputils_1.3.1-1 \
                                  rcutils/rcutils_1.1.3-1 \
                                      rmw/rmw_1.0.3-1 \
                          rmw-dds-common/rmw-dds-common_1.0.3-1 \
                            rmw-fastrtps/rmw-fastrtps-cpp_1.2.5-1 \
                            rmw-fastrtps/rmw-fastrtps-shared-cpp_1.2.5-1 \
                      rmw-implementation/rmw-implementation_1.0.2-1 \
                                      rmw/rmw-implementation-cmake_1.0.3-1 \
                            ros-workspace/ros-workspace_1.0.1-1 \
                                ros2cli/ros2cli_0.9.9-1 \
                              launch-ros/ros2launch_0.11.2-1 \
                                  ros2cli/ros2pkg_0.9.9-1 \
                                  ros2cli/ros2topic_0.9.9-1 \
                          rcl-interfaces/rosgraph-msgs_1.0.0-1 \
                                  rosidl/rosidl-adapter_1.2.1-1 \
                                  rosidl/rosidl-cmake_1.2.1-1 \
                          rosidl-defaults/rosidl-default-runtime_1.0.1-1 \
                                  rosidl/rosidl-generator-c_1.2.1-1 \
                            rosidl-python/rosidl-generator-py_0.9.4-1 \
                                  rosidl/rosidl-parser_1.2.1-1 \
                                  rosidl/rosidl-runtime-c_1.2.1-1 \
                                  rosidl/rosidl-runtime-cpp_1.2.1-1 \
                        rosidl-runtime-py/rosidl-runtime-py_0.9.1-1 \
                      rosidl-typesupport/rosidl-typesupport-c_1.0.2-1 \
                      rosidl-typesupport/rosidl-typesupport-cpp_1.0.2-1 \
              rosidl-typesupport-fastrtps/rosidl-typesupport-fastrtps-c_1.0.3-1 \
              rosidl-typesupport-fastrtps/rosidl-typesupport-fastrtps-cpp_1.0.3-1 \
                                  rosidl/rosidl-typesupport-interface_1.2.1-1 \
                                  rosidl/rosidl-typesupport-introspection-c_1.2.1-1 \
                                  rosidl/rosidl-typesupport-introspection-cpp_1.2.1-1 \
      \                ydlidar-ros2-driver/ydlidar-ros2-driver_1.0.1 \
              rpyutils/rpyutils_0.2.0-1 \
                          spdlog-vendor/spdlog-vendor_1.1.3-1 \
                          rcl-interfaces/statistics-msgs_1.0.0-1 \
                        common-interfaces/std-msgs_2.0.4-1 \
                        common-interfaces/std-srvs_2.0.4-1 \
                                geometry2/tf2_0.13.10-1 \
                                geometry2/tf2-msgs_0.13.10-1 \
                                geometry2/tf2-py_0.13.10-1 \
                                geometry2/tf2-ros_0.13.10-1 \
                  unique-identifier-msgs/unique-identifier-msgs_2.1.3-1 \
                        common-interfaces/visualization-msgs_2.0.4-1 \
      "
    
      # What's built by packagegroup-ros-world. Does not include packages that appear solely in ROS_SUPERFLORE_GENERATED_BUILDTOOLS
      # (with a -native suffix) or ROS_SUPERFLORE_GENERATED_TESTS.
      ROS_SUPERFLORE_GENERATED_WORLD_PACKAGES = " \
          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 \
          ydlidar-ros2-driver \
          rpyutils \
          sensor-msgs \
          spdlog-vendor \
          statistics-msgs \
          std-msgs \
          std-srvs \
          tf2 \
          tf2-msgs \
          tf2-py \
          tf2-ros \
          unique-identifier-msgs \
          visualization-msgs \
      "
    
      # Packages found in the <buildtool_depend> and <buildtool_export_depend> items, ie, ones for which a -native is built. Does not
      # include those found in the ROS_EXEC_DEPENDS values in the recipes of build tools.
      ROS_SUPERFLORE_GENERATED_BUILDTOOLS_FOXY = " \
          ${ROS_UNRESOLVED_DEP-ament-python-native} \
          ${ROS_UNRESOLVED_DEP-java-native} \
          ${ROS_UNRESOLVED_DEP-maven-native} \
          ${ROS_UNRESOLVED_DEP-rti-connext-dds-5.3.1-native} \
          ament-clang-format-native \
          ament-clang-tidy-native \
          ament-cmake-auto-native \
          ament-cmake-core-native \
          ament-cmake-export-definitions-native \
          ament-cmake-export-dependencies-native \
          ament-cmake-export-include-directories-native \
          ament-cmake-export-interfaces-native \
          ament-cmake-export-libraries-native \
          ament-cmake-export-link-flags-native \
          ament-cmake-export-targets-native \
          ament-cmake-gmock-native \
          ament-cmake-google-benchmark-native \
          ament-cmake-gtest-native \
          ament-cmake-include-directories-native \
          ament-cmake-libraries-native \
          ament-cmake-native \
          ament-cmake-pytest-native \
          ament-cmake-python-native \
          ament-cmake-ros-native \
          ament-cmake-target-dependencies-native \
          ament-cmake-test-native \
          ament-cmake-version-native \
          ament-copyright-native \
          ament-cppcheck-native \
          ament-cpplint-native \
          ament-flake8-native \
          ament-index-python-native \
          ament-lint-cmake-native \
          ament-mypy-native \
          ament-package-native \
          ament-pclint-native \
          ament-pep257-native \
          ament-pycodestyle-native \
          ament-pyflakes-native \
          ament-uncrustify-native \
          ament-xmllint-native \
          builtin-interfaces-native \
          cmake-native \
          connext-cmake-module-native \
          eigen3-cmake-module-native \
          fastcdr-native \
          fastrtps-cmake-module-native \
          fastrtps-native \
          git-native \
          gmock-vendor-native \
          gtest-native \
          gtest-vendor-native \
          launch-testing-ament-cmake-native \
          launch-testing-native \
          lcov-native \
          mrt-cmake-modules-native \
          pkgconfig-native \
          python-cmake-module-native \
          python3-catkin-pkg-native \
          python3-empy-native \
          python3-native \
          python3-nose-native \
          python3-pytest-native \
          python3-pyyaml-native \
          python3-rospkg-native \
          python3-setuptools-native \
          qtbase-native \
          rcutils-native \
          rmw-implementation-cmake-native \
          ros-environment-native \
          ros2test-native \
          rosidl-cmake-native \
          rosidl-default-generators-native \
          rosidl-generator-c-native \
          rosidl-generator-cpp-native \
          rosidl-generator-dds-idl-native \
          rosidl-generator-py-native \
          rosidl-parser-native \
          rosidl-runtime-c-native \
          rosidl-runtime-cpp-native \
          rosidl-typesupport-c-native \
          rosidl-typesupport-connext-cpp-native \
          rosidl-typesupport-cpp-native \
          rosidl-typesupport-fastrtps-cpp-native \
          rosidl-typesupport-interface-native \
          rosidl-typesupport-introspection-c-native \
          rosidl-typesupport-introspection-cpp-native \
      "
    
      ROS_SUPERFLORE_GENERATED_BUILDTOOLS_append = " ${ROS_SUPERFLORE_GENERATED_BUILDTOOLS_FOXY}"
    
      ROS_SUPERFLORE_GENERATED_PLATFORM_PACKAGE_DEPENDENCIES = " \
          ${PYTHON_PN}-lxml \
          ${PYTHON_PN}-numpy \
          ${PYTHON_PN}-pyflakes \
          libtinyxml2 \
          python3-catkin-pkg \
          python3-catkin-pkg-native \
          python3-empy \
          python3-empy-native \
          python3-lark-parser \
          python3-mock \
          python3-netifaces \
          python3-nose \
          python3-nose-native \
          python3-nose-yanc \
          python3-numpy \
          python3-pep8 \
          python3-pyyaml \
          python3-pyyaml-native \
          python3-setuptools \
          python3-setuptools-native \
      "
    
      # Packages found only in <test_depend> items. Does not include those found only in the ROS_*_DEPENDS of recipes of tests.
      ROS_SUPERFLORE_GENERATED_TESTS = " \
          ${PYTHON_PN}-numpy \
          python3-nose \
          python3-nose-yanc \
          python3-pep8 \
      "
    
      ROS_SUPERFLORE_GENERATED_RECIPES_FOR_COMPONENTS = " \
          ament-cmake \
          ament-package \
          class-loader \
          console-bridge-vendor \
          fastrtps \
          foonathan-memory-vendor \
          launch \
          launch-ros \
          libstatistics-collector \
          libyaml-vendor \
          message-filters \
          osrf-pycommon \
          rcl \
          rcl-interfaces \
          rclcpp \
          rclpy \
          rcpputils \
          rcutils \
          rmw \
          rmw-dds-common \
          rmw-implementation \
          ros-workspace \
          ros2cli \
          rosidl-runtime-py \
          ydlidar-ros2-driver \
          rpyutils \
          spdlog-vendor \
          unique-identifier-msgs \
      "
    
      # Platform packages without a OE-RECIPE@OE-LAYER mapping in base.yaml, python.yaml, or ruby.yaml. Until they are added, override
      # the settings in ros-distro.inc .
      ROS_UNRESOLVED_DEP-ament-python-native = "ROS_UNRESOLVED_DEP-ament-python-native"
      ROS_UNRESOLVED_DEP-clang-format = "ROS_UNRESOLVED_DEP-clang-format"
      ROS_UNRESOLVED_DEP-clang-tidy = "ROS_UNRESOLVED_DEP-clang-tidy"
      ROS_UNRESOLVED_DEP-coinor-libcbc-dev = "ROS_UNRESOLVED_DEP-coinor-libcbc-dev"
      ROS_UNRESOLVED_DEP-coinor-libcgl-dev = "ROS_UNRESOLVED_DEP-coinor-libcgl-dev"
      ROS_UNRESOLVED_DEP-coinor-libclp-dev = "ROS_UNRESOLVED_DEP-coinor-libclp-dev"
      ROS_UNRESOLVED_DEP-coinor-libcoinutils-dev = "ROS_UNRESOLVED_DEP-coinor-libcoinutils-dev"
      ROS_UNRESOLVED_DEP-coinor-libipopt-dev = "ROS_UNRESOLVED_DEP-coinor-libipopt-dev"
      ROS_UNRESOLVED_DEP-cwiid = "ROS_UNRESOLVED_DEP-cwiid"
      ROS_UNRESOLVED_DEP-cwiid-dev = "ROS_UNRESOLVED_DEP-cwiid-dev"
      ROS_UNRESOLVED_DEP-gazebo11 = "ROS_UNRESOLVED_DEP-gazebo11"
      ROS_UNRESOLVED_DEP-gurumdds-2.7 = "ROS_UNRESOLVED_DEP-gurumdds-2.7"
      ROS_UNRESOLVED_DEP-ignition-gazebo3 = "ROS_UNRESOLVED_DEP-ignition-gazebo3"
      ROS_UNRESOLVED_DEP-ignition-math6 = "ROS_UNRESOLVED_DEP-ignition-math6"
      ROS_UNRESOLVED_DEP-ignition-msgs5 = "ROS_UNRESOLVED_DEP-ignition-msgs5"
      ROS_UNRESOLVED_DEP-ignition-transport8 = "ROS_UNRESOLVED_DEP-ignition-transport8"
      ROS_UNRESOLVED_DEP-java = "ROS_UNRESOLVED_DEP-java"
      ROS_UNRESOLVED_DEP-java-native = "ROS_UNRESOLVED_DEP-java-native"
      ROS_UNRESOLVED_DEP-libbluetooth = "ROS_UNRESOLVED_DEP-libbluetooth"
      ROS_UNRESOLVED_DEP-libbluetooth-dev = "ROS_UNRESOLVED_DEP-libbluetooth-dev"
      ROS_UNRESOLVED_DEP-libcunit-dev = "ROS_UNRESOLVED_DEP-libcunit-dev"
      ROS_UNRESOLVED_DEP-libgazebo11-dev = "ROS_UNRESOLVED_DEP-libgazebo11-dev"
      ROS_UNRESOLVED_DEP-libomp-dev = "ROS_UNRESOLVED_DEP-libomp-dev"
      ROS_UNRESOLVED_DEP-libqglviewer2-qt5 = "ROS_UNRESOLVED_DEP-libqglviewer2-qt5"
      ROS_UNRESOLVED_DEP-libspnav-dev = "ROS_UNRESOLVED_DEP-libspnav-dev"
      ROS_UNRESOLVED_DEP-maven-native = "ROS_UNRESOLVED_DEP-maven-native"
      ROS_UNRESOLVED_DEP-python3-collada = "ROS_UNRESOLVED_DEP-python3-collada"
      ROS_UNRESOLVED_DEP-python3-retrying = "ROS_UNRESOLVED_DEP-python3-retrying"
      ROS_UNRESOLVED_DEP-python3-watchdog = "ROS_UNRESOLVED_DEP-python3-watchdog"
      ROS_UNRESOLVED_DEP-python3-zmq = "ROS_UNRESOLVED_DEP-python3-zmq"
      ROS_UNRESOLVED_DEP-qttools5-dev-tools = "ROS_UNRESOLVED_DEP-qttools5-dev-tools"
      ROS_UNRESOLVED_DEP-rti-connext-dds-5.3.1 = "ROS_UNRESOLVED_DEP-rti-connext-dds-5.3.1"
      ROS_UNRESOLVED_DEP-rti-connext-dds-5.3.1-native = "ROS_UNRESOLVED_DEP-rti-connext-dds-5.3.1-native"
      ROS_UNRESOLVED_DEP-rviz = "ROS_UNRESOLVED_DEP-rviz"
      ROS_UNRESOLVED_DEP-spacenavd = "ROS_UNRESOLVED_DEP-spacenavd"
      ROS_UNRESOLVED_DEP-uncrustify = "ROS_UNRESOLVED_DEP-uncrustify"
    
      # From the release announcement or the last field of the "<ROS_DISTRO>/YYYY-MM-DD" tag for the release in
      # https://github.com/ros/rosdistro/tags. Prior to the first release of a ROS_DISTRO, it is set to "".
      ROS_DISTRO_RELEASE_DATE = "2021-04-26"
    
      # The commit of ros/rosdistro/foxy/distribution.yaml from which the recipes were generated.
      ROS_SUPERFLORE_GENERATION_COMMIT = "8916fda922fba94107bf01cee956168b19bba1dd"
    
      # Version of scripts/ros-generate-cache.sh which was used to generate cache from which the recipes and this configuration
      # file were last generated
      ROS_GENERATE_CACHE_PROGRAM_VERSION = "1.6.2"
    
      # Version of scripts/ros-generate-recipes.sh which was used to generate recipes and this configuration file
      ROS_GENERATE_RECIPES_PROGRAM_VERSION = "1.6.0"
    
    
    
    # Update ros-distro.inc
      
    ## https://drive.google.com/file/d/1-XfYlw_1V5Yz2yjxOzxiwZg0xsaUkC6O/view?usp=sharing
    $ touch ros-distro/include/foxy/ros-distro-core-ydlidar.inc
    $ vim ros-distro/include/foxy/ros-distro-core-ydlidar.inc
    
      # foxy/ros-distro-core-ydlidar.inc
      # General configuration settings that are dependent on ROS_DISTRO.
      # edited to contain core dependencies required for ydlidar
      # Copyright (c) 2020-2021 LG Electronics, Inc.
    
      ROS_DISTRO_CODENAME = "Foxy Fitzroy"
    
      ROS2_DISTRO = "foxy"
    
      # The platform release that the metadata for this ROS distro targets. This determines the versions of the platform packages that
      # OE must provide. It must be one of the values of ROS_DISTRO_RELEASE_PLATFORMS (which is set in
      # generated/superflore-ros-distro.inc).
      ROS_DISTRO_BASELINE_PLATFORM = "ubuntu-focal"
    
      require conf/ros-distro/include/foxy/generated/superflore-datetime.inc
      require conf/ros-distro/include/foxy/generated/superflore-ros-distro-core-ydlidar.inc
      require conf/ros-distro/include/foxy/ros-distro-recipe-blacklist.inc
      require conf/ros-distro/include/foxy/ros-distro-preferred-versions.inc
      require conf/ros-distro/include/foxy/ros-distro-preferred-providers.inc
    
      # Override settings from generated/superflore-ros-distro.inc here.
    
      # Since superflore doesn't know when it's generating a recipe that it will be for a build tool, it can't know that what's in
      # ROS_EXEC_DEPEND are also build tools. Manually add them here.
      ROS_SUPERFLORE_GENERATED_BUILDTOOLS += " \
          ament-lint-native \
          domain-coordinator-native \
          foonathan-memory-vendor-native \
          rcpputils-native \
          rmw-dds-common-native \
          rmw-fastrtps-cpp-native \
          rmw-fastrtps-shared-cpp-native \
          rmw-native \
          rosidl-adapter-native \
          rosidl-default-runtime-native \
          rosidl-parser-native \
        rosidl-typesupport-fastrtps-c-native \
          rpyutils-native \
          uncrustify-vendor-native \
      "
    
      # this needs google-benchmark-vendor-native but we probably don't need native version
      ROS_SUPERFLORE_GENERATED_BUILDTOOLS_remove = "ament-cmake-google-benchmark-native"
    
      # alternative not yet supported implementation for fastrtps
      ROS_WORLD_SKIP_GROUPS += "connext"
      # alternative not yet supported implementation for fastrtps
      ROS_WORLD_SKIP_GROUPS += "opensplice"
      # alternative not yet supported implementation for fastrtps, there is no recipe for gurumdds-2.6
      ROS_WORLD_SKIP_GROUPS += "gurumdds"
      # Can't build these until we figure out how to build clang-format, clang-tidy without building all of clang.
      ROS_WORLD_SKIP_GROUPS += "clang"
      # recipes depending on turtlebot3 specific recipes which weren't ported to eloquent yet
      ROS_WORLD_SKIP_GROUPS += "turtlebot3"
      # recipes depending on coinor-libipopt
      ROS_WORLD_SKIP_GROUPS += "coinor-libipopt"
      # Needs work to launch qemu to run tests on image on build machine.
      ROS_WORLD_SKIP_GROUPS += "launch"
      # recipes depending on ROS_UNRESOLVED_DEP-python3-babeltrace which cannot be just
      # set to babeltrace, because python bindings in babeltrace are not enabled as shown in log.do_configure:
      # configure: You may configure with --enable-python-bindings if you want Python bindings.
      ROS_WORLD_SKIP_GROUPS += "babeltrace-python"
      # recipes depends on cwiid
      ROS_WORLD_SKIP_GROUPS += "cwiid"
      # recipes depends on libspnav
      ROS_WORLD_SKIP_GROUPS += "libspnav"
      # recipes depends on ROS_UNRESOLVED_DEP-rostime (probably the rostime from ROS1 which wasn't added to ROS2 yet)
      ROS_WORLD_SKIP_GROUPS += "rostime"
      # recipes depends on ROS_UNRESOLVED_DEP-message-generation (probably the message-generation from ROS1 which wasn't added to ROS2 yet)
      ROS_WORLD_SKIP_GROUPS += "message-generation"
      # recipes depending on legacy mongo-cxx-driver (https://packages.debian.org/source/stretch/mongo-cxx-driver-legacy)
      # the mongodb recipe in meta-oe installs just the binaries mongoc, mongos, install_compass
      # the header files searched by mongo-store, warehouse-ros-mongo cmake files cmake/FindMongoClient.cmake and cmake/FindMongoDB.cmake
      # aren't even part of current version of mongo-cxx-driver
      # src/mongo/client/dbclient.h and src/mongo/client/dbclientinterface.h are only in the legacy branches
      ROS_WORLD_SKIP_GROUPS += "mongodb-legacy-cxx-driver"
    
      # recipes depending on 'x11' in DISTRO_FEATURES
      ROS_WORLD_SKIP_GROUPS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'x11', d)}"
      # recipes depending on 'opengl' in DISTRO_FEATURES
      ROS_WORLD_SKIP_GROUPS += "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '', 'opengl', d)}"
      # recipes depending on 'ffmpeg' which is restricted by 'commercial' LICENSE_FLAG
      ROS_WORLD_SKIP_GROUPS += "${@bb.utils.contains_any('LICENSE_FLAGS_WHITELIST', ['commercial', 'ffmpeg', 'commercial_ffmpeg'], '', 'ffmpeg', d)}"
      # recipes depending on 'x264' (ffmpeg does depend on it by default as well) which is restricted by 'commercial' LICENSE_FLAG
      ROS_WORLD_SKIP_GROUPS += "${@bb.utils.contains_any('LICENSE_FLAGS_WHITELIST', ['commercial', 'x264', 'commercial_x264'], '', 'x264', d)}"
      # There is recipe for glfw in meta-oe in dunfell, but it still needs x11 in DISTRO_FEATURES
      # use that in dunfell and blacklist explicitly in older releases
      ROS_WORLD_SKIP_GROUPS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'glfw', d)}"
    
      # webots recipes depending on unavailable python moules like:
      # ERROR: Nothing RPROVIDES 'ROS_UNRESOLVED_DEP-python-transforms3d-pip' (but meta-ros2-foxy/generated-recipes/webots-ros2-desktop/webots-ros2-core_0.0.3-1.bb RDEPENDS on or otherwise requires it)
      # ERROR: Nothing RPROVIDES 'ROS_UNRESOLVED_DEP-urdf2webots-pip' (but meta-ros2-foxy/generated-recipes/webots-ros2-desktop/webots-ros2-importer_0.0.3-1.bb RDEPENDS on or otherwise requires it)
      # ERROR: Nothing RPROVIDES 'ROS_UNRESOLVED_DEP-python3-collada-pip' (but meta-ros2-foxy/generated-recipes/webots-ros2-desktop/webots-ros2-importer_0.0.3-1.bb RDEPENDS on or otherwise requires it)
      ROS_WORLD_SKIP_GROUPS += "webots-python-modules"
    
      # recipes depending on gazebo, for which there is no OE recipe
      ROS_WORLD_SKIP_GROUPS += "gazebo"
    
      # doosan-robot2 recipes depending on ROS_UNRESOLVED_DEP-controller_manager, ROS_UNRESOLVED_DEP-hardware_interface, ROS_UNRESOLVED_DEP-ament_python-native
      ROS_WORLD_SKIP_GROUPS += "doosan-robot2"
    
      # recipes depending on ros1
      ROS_WORLD_SKIP_GROUPS += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'ros1-layer', '', 'ros1', d)}"
    
      # recipes depending on something from meta-qt5 layer
      ROS_WORLD_SKIP_GROUPS += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', '', 'qt5', d)}"
    
      # recipes depending on libqglviewer (https://packages.debian.org/source/stretch/libqglviewer https://packages.debian.org/stretch/libqglviewer2-qt5)
      ROS_WORLD_SKIP_GROUPS += "libqglviewer"
    
      # recipes depending on ignition-* (ROS_UNRESOLVED_DEP-ignition-math6, ROS_UNRESOLVED_DEP-ignition-msgs5, ROS_UNRESOLVED_DEP-ignition-transport8)
      ROS_WORLD_SKIP_GROUPS += "ignition"
    
      # recipes depending on pugixml
      ROS_WORLD_SKIP_GROUPS += "pugixml"
    
      # Not compatible with newer libftdi included in meta-oe: https://github.com/kobuki-base/kobuki_ftdi/issues/3
      ROS_WORLD_SKIP_GROUPS += "kobuki-ftdi"
    
      # recipes depending on java from meta-java
      ROS_WORLD_SKIP_GROUPS += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-java', '', 'java', d)}"
    
      # recipes depending on libomp which could be provided by openmp@meta-clang
      ROS_WORLD_SKIP_GROUPS += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'clang-layer', '', 'libomp', d)}"
    
      # do_configure failures
      ROS_WORLD_SKIP_GROUPS += " \
          lanelet2-traffic-rules \
      "
    
      # do_compile failures
      ROS_WORLD_SKIP_GROUPS += " \
          mrpt2 \
          qt-gui-cpp \
      "
    
      # Must use a _pn- override in this file to override the ROS_BUILD_TYPE of a generated recipe,
      # because we need to set this variable before the "inherit" line in the recipe is parsed,
      # and having it in a .bbappend sets it too late.
      # We want ament_cmake instead of plain cmake for ros-workspace:
      # https://raw.github.com/ros2-gbp/ros_workspace-release/release/foxy/ros_workspace/1.0.1-1/package.xml
      ROS_BUILD_TYPE_pn-ros-workspace = "ament_cmake"
    
      # Used by generated-recipes/cyclonedds/cyclonedds_0.7.0-1.bb:
      ROS_UNRESOLVED_DEP-java-native = ""
      ROS_UNRESOLVED_DEP-maven-native = ""
    
      # Submitted with https://github.com/ros/rosdistro/pull/29534
      ROS_UNRESOLVED_DEP-qttools5-dev-tools = "qttools"
    
    
    # Update layer.conf
      
    ## https://drive.google.com/file/d/1PbtCrQHI8xXwTMxfvZaXyWx3n_WBuMat/view?usp=sharing
    $ vim layer.conf
    
      # We have a conf and classes directory, append to BBPATH
      BBPATH .= ":${LAYERDIR}"
    
      # We have a recipes directory, add to BBFILES
      BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend ${LAYERDIR}/generated-recipes/*/*.bb"
    
      BBFILE_COLLECTIONS += "ros2-foxy-layer"
      BBFILE_PATTERN_ros2-foxy-layer := "^${LAYERDIR}/"
      BBFILE_PRIORITY_ros2-foxy-layer = "12"
    
      # Version 1 was the manually created meta-ros, prior to the introduction of superflore.
      # Version 2 was all ROS distributions in the same meta-ros layer with right subdirectories selected by ROS_DISTRO variable
      # Version 3 is with each ROS distribution in separate sublayer of meta-ros git repository (with modifications to generated recipes applied in .bbappends instead of .inc files)
      LAYERVERSION_ros2-foxy-layer = "3"
    
      LAYERDEPENDS_ros2-foxy-layer = " \
          core \
          meta-python \
          openembedded-layer \
          ros-common-layer \
          ros2-layer \
      "
    
      LAYERSERIES_COMPAT_ros2-foxy-layer = "${ROS_OE_RELEASE_SERIES}"
    
      # require conf/ros-distro/include/foxy/ros-distro.inc
      require conf/ros-distro/include/foxy/ros-distro-core-ydlidar.inc
    
    
    # Final State
    
    $ cd $AGL_TOP/master/external/meta-ros/meta-ros2-foxy/conf/
    $ tree
      ├── layer.conf [modified]
      └── ros-distro
          └── include
              └── foxy
                  ├── generated
                  │   ├── superflore-datetime.inc
                  │   ├── superflore-ros-distro.inc [x]
                  |   └── superflore-ros-distro-core-ydlidar.inc [new]
                  ├── ros-distro.inc [x]
                  ├── ros-distro-core-ydlidar.inc [new]
                  ├── ros-distro-preferred-providers.inc
                  ├── ros-distro-preferred-versions.inc
                  ├── ros-distro-recipe-blacklist.inc
                  └── ros-distro-recipe-blacklist-logs
                      ├── lanelet2-traffic-rules.do_configure
                      ├── mrpt2.do_compile
                      ├── qt-gui-cpp.do_compile
                      └── warehouse-ros-mongo.do_configure
    ## the files marked [x] will be not currently in use, instead modified [new] files will be used.
    

Build core-master/x86: meta-ros + agl-image-weston + YDLIDAR core dependencies support

  • Kindly go through build process of AGL and building for x86 for detailed reference to setup and initialize AGL workspace.

    # After setting up AGL workspace
    
    # Clone the meta-ros layer, skip if already cloned
    $ cd $AGL_TOP/master/external
    $ git clone https://github.com/ros/meta-ros.git
    $ cd meta-ros
    $ git checkout -b dunfell
    
    # Setup build directory
    $ cd $AGL_TOP/master/
    $ source meta-agl/scripts/aglsetup.sh -b core-build-x86-meta-ros-weston agl-devel
    $ ln -sf $AGL_TOP/site.conf conf/
    $ ls -alh conf/
        
    # Edit the following conf files :
    
    $ vim conf/local.conf #add the following to the bottom, to save error logs for future debugging
    # local.conf
      INHERIT += "buildhistory"
      BUILDHISTORY_COMMIT = "1"
      IMAGE_INSTALL_append = " packagegroup-ros-world-foxy"
          
    $ vim conf/bblayers.conf #Replace the following chunk
    # bblayers.conf
      AGL_META_NETWORKING ?= ""
      AGL_META_PYTHON = "${METADIR}/external/meta-openembedded/meta-python"
      AGL_META_ROS = " \
        ${METADIR}/external/meta-ros/meta-ros-common \
        ${METADIR}/external/meta-ros/meta-ros-backports-gatesgarth \
        ${METADIR}/external/meta-ros/meta-ros2 \
        ${METADIR}/external/meta-ros/meta-ros2-foxy \
        "
      AGL_OTHER_DEPENDENCY_LAYERS = " \
        ${AGL_META_NETWORKING} \
        ${AGL_META_PYTHON} \
        ${AGL_META_ROS} \
        "
    
    # Build the image
    
    $ cd $AGL_TOP/master/core-build-x86-meta-ros-weston/
    $ source agl-init-build-env #if not sourced
    $ bitbake -p ros-core #build ros-core first, to check all layers are added.
    $ time bitbake agl-image-weston #wait for the build process to finish.
    

Run core-master/x86: meta-ros + agl-image-weston + YDLIDAR core dependencies support

  • Kindly use pre-built image agl-image-weston-qemux86-64, if you want to skip the building process.

  • Kindly go through using prebuilt x86 images for detailed reference to setup and initialize AGL workspace.

    # gdrive : https://drive.google.com/drive/folders/1wqgsf9BnM4dUme9W0yOxvhyn260WwHtj?usp=sharing
    
    # Install the dependencies
    $ apt-get install qemu
    $ sudo apt install vinagre
    $ sudo apt install qemu-system-x86
    
    # Copy image and kernel files
    $ cp ~/Downloads/agl-image-weston-qemux86-64.ext4 ./
    $ cp ~/Downloads/bzImage ./
    $ sync
    
    # Run
    $ vim startup.sh
      # attach YDLIDAR to the host system.
      #-device usb-host,hostbus=1,hostport=4, change accordingly to ydlidar usb port `lsusb -t` 
    
      ( sleep 5 && vinagre --vnc-scale localhost ) > /tmp/vinagre.log 2>&1 &
          qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 -netdev user,id=net0,hostfwd=tcp::2222-:22 \
          -drive file=agl-image-weston-qemux86-64.ext4,if=virtio,format=raw -show-cursor -usb -usbdevice tablet -device virtio-rng-pci \
          -device usb-host,hostbus=1,hostport=4 -vga virtio \
          -vnc :0 -soundhw hda -machine q35 -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm \
          -m 2048 -serial mon:vc -serial mon:stdio -serial null -kernel bzImage \
    
    $ sudo ./startup.sh
    
    # Boots up
    qemu-system-x86_64: -usbdevice tablet: '-usbdevice' is deprecated, please use '-device usb-...' instead
    qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
    
    Automotive Grade Linux 11.91.0+snapshot qemux86-64 ttyS1
    
    qemux86-64 login: root
        
    ## Run ROS.
    root@qemux86-64:~# source /usr/bin/ros_setup.sh
    root@qemux86-64:/# echo $LD_LIBRARY_PATH
      /usr/lib/x86_64-linux-gnu:/usr/lib
    
    ## Run YDLIDAR.
    root@qemux86-64:/# cd /usr/share/ydlidar_ros2_driver/ 
    root@qemux86-64:/# vim params/ydlidar.yaml
    # Edit accordingly, for YDLIDAR X4 :
      ydlidar_ros2_driver_node:
        ros__parameters:
          port: /dev/ttyUSB0
          frame_id: laser_frame
          ignore_array: ""
          baudrate: 128000
          lidar_type: 1
          device_type: 0
          sample_rate: 5
          abnormal_check_count: 4
          resolution_fixed: true
          reversion: false
          inverted: true
          auto_reconnect: true
          isSingleChannel: false
          intensity: false
          support_motor_dtr: true
          angle_max: 180.0
          angle_min: -180.0
          range_max: 12.0
          range_min: 0.1
          frequency: 8.0
          invalid_range_is_inf: false
    
    root@qemux86-64:/usr/share/ydlidar_ros2_driver# ros2 launch launch/ydlidar_launch.py # YDLIDAR starts spinning
    
    # In a new terminal, ssh into qemu : $ ssh -p 2222 root@localhost
    root@qemux86-64:~# source /usr/bin/ros_setup.sh
    root@qemux86-64:/# echo $LD_LIBRARY_PATH
      /usr/lib/x86_64-linux-gnu:/usr/lib
    root@qemux86-64:~# ros2 topic list -t
      /parameter_events [rcl_interfaces/msg/ParameterEvent]
      /rosout [rcl_interfaces/msg/Log]
      /scan [sensor_msgs/msg/LaserScan]
      /tf_static [tf2_msgs/msg/TFMessage]
      /ydlidar_ros2_driver_node/transition_event [lifecycle_msgs/msg/TransitionEvent]
    root@qemux86-64:~# ros2 topic echo /scan # View data stream
        
    # In either terminal
    root@qemux86-64:/# poweroff #else, runs in background
    

Preliminary review and research to develop LIDAR visualization application on AGL