Acceleration Robotics and Microchip have collaborated to produce the Robot Operating System (ROS) 2 for the RISC-V-based PolarFire® SoC FPGA Icicle Kit. Learn more about the framework in this blog post.
ROS (Robot Operating System) is a popular open-source framework used for creating robotics applications. It provides a set of tools and libraries for building complex robotic systems and has gained immense popularity due to its flexibility, scalability and easy-to-use APIs. ROS 2 Humble is the latest long-term support (LTS) version of ROS.
In collaboration with Microchip, Acceleration Robotics published the ROS 2 release for the first RISC-V based System-on-Chip (SoC) field-programmable gate array (FPGA)—Microchip’s PolarFire® SoC FPGA Icicle Kit, expanding support for the RISC-V open-source community and offering a portfolio of ROS 2-API compatible IP cores for robotic tasks including perception and coordinate transformations.
Robotics
Robotics is the art of real-time system integration. Robots are deterministic machines that essentially meet computation deadlines. Robot brains (and robot behaviors) take the form of computational graphs, with data flowing between computation nodes and across physical networks (communication buses) while mapping to underlying sensors and actuators. The popular choice for building these computational graphs for robots is the Robot Operating System, a framework for robot application development. ROS is the common language in robotics, with hundreds of companies and thousands of developers using it every day. Most companies that build robots today use ROS or similar event-driven software frameworks.
Business Wire reports that “according to ABI Research… nearly 55% of total commercial robots shipped in 2024… will have at least one ROS package installed, creating a large installed base of ROS-enabled robots."
Why Is ROS So Important?
Robots are networks of networks, with sensors capturing data, passing it to compute technologies, and then on to actuators and back again in a deterministic manner. These networks can be understood as the robot’s nervous system, passing across compute nodes that represent neurons. Like human nervous systems, real-time information across all these computational nodes is fundamental for the robot to behave coherently. "Robot brains" are built with this same philosophy. Behaviors take the form of computational graphs, with data flowing between nodes, across physical networks (communication buses) and while mapping to underlying sensors, computing technologies and actuators. ROS enables you to build these computational graphs and create robot behaviors by providing libraries, a communication infrastructure, drivers and tools to put it all together.
ROS 2
It’s a de facto framework for robot application development. Through the meta-ros project maintained by community members—including Acceleration Robotics—Yocto and ROS 2 allow you to build custom Linux-based production-grade operating systems for robots that obtain the best performance for your use case. This post provides a walkthrough on how to build a Linux operating system with ROS 2 Humble for the Microchip PolarFire SoC FPGA Icicle Kit board and showcases our contribution to the ROS 2 community by bringing ROS 2 Humble support for the Yocto Honister release. Lastly, we show how to get better performance with ROS 2 Humble using the Acceleration Robotics’ ROBOTCORE® Framework, a hardware acceleration framework for ROS and ROS 2.
ROS 2 Humble in Microchip PolarFire FPGA SoC with Yocto
Acceleration Robotics is a firm focused on designing customized brains for robots to hasten their response time. The company creates custom compute architectures for high-performance robots through hardware acceleration solutions. In a nutshell, we deliver semiconductor building blocks for robots while remaining accelerator-agnostic (FPGAs or GPUs), and as such, building custom high-performing Linux distributions becomes second nature. Adding ROS to such distributions while using Yocto can be done with the meta-ros layers and recipes.
As an active member of the ROS and ROS 2 communities, Acceleration Robotics is among the early contributors of meta-ros (back in 2013, in the old ROS 1 days) and first ported meta-ros to ROS 2 a few years back. To get ROS 2 Humble into custom embedded Linux OSs, our team at Acceleration Robotics contributed a series of Yocto recipes by updating the meta-ros project (see Pull Request). In total our contributions modified 60K LOC across more than 1000 files.
Porting Custom ROS 2 Humble on Microchip PolarFire SoC FPGA Icicle Kit
Step 0. Fetch meta-tegra BSP and checkout Honister's branch
mkdir polarfire-yocto-bsp && cd polarfire-yocto-bsp
sudo apt-get install -y repo
repo init -u https://github.com/polarfire-soc/meta-polarfire-soc-yocto-bsp.git -b master -m tools/manifests/riscv-yocto.xml repo sync repo rebase
Step 1. Build basic example BSP for Microchip PolarFire Icicle Kit:
. ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
MACHINE=icicle-kit-es bitbake mpfs-dev-cli
Step 2. Add ROS 2 Humble meta layer
git clone https://github.com/vmayoral/meta-ros -b honister-humble
Step 3. Add meta-layers for ROS 2 Humble and configure them in Yocto/PetaLinux:
The meta-ros layer should be configured to be built by editing build/conf/bblayers.conf and adding the following at the end:
<your-project-path>/meta-ros/meta-ros2 \
<your-project-path>/meta-ros/meta-ros2-humble \
<your-project-path>/meta-ros/meta-ros-common \
In addition, add the following (e.g. at the beginning of the file) as well, which defines some variables to be used by the meta-ros recipes:
# define the ROS 2 Yocto target release
ROS_OE_RELEASE_SERIES = "honister"
# define ROS 2 distro
ROS_DISTRO = "humble"
Step 4. Create a Yocto recipe image including ROS 2 Humble:
There are various ways to build the meta-ros recipes. The following creates a new Yocto image recipe with the bare minimum packages required to execute pub/sub examples while including ROS 2 Humble with two open-source DDS implementations:
Step 5. Build the image
What's left is to build the project and generate the embedded artifacts desired (kernel, bootloader firmware, rootfs, sysroot, etc.):
MACHINE=icicle-kit-es bitbake demo-image-ros2
This will take a while and in time, once it finalizes, you'll have your rootfs with ROS 2 Humble.
ROBOTCORE® Framework, FPGA and GPU Hardware Acceleration Framework for ROS
ROBOTCORE® Framework provides an open architecture for hardware acceleration in robotics. It helps build custom compute architectures for robots, or IP cores, that make robots faster, more deterministic and/or power-efficient. Simply put, it provides a vendor-agnostic development (including Microchip’s middleware for hardware acceleration, as well as other vendors’), build and deployment experience for creating robot hardware and hardware accelerators similar to the standard, non-accelerated ROS development flow.
The Microchip PolarFire Icicle Kit can speed up ROS computations with its FPGA and ROBOTCORE Framework to get you everything you need to create robot cores to boost your ROS 2 Humble architectures with Microchip PolarFire Icicle Kit—all while providing a vendor-agnostic ROS-centric development flow for hardware acceleration, so that you don’t reinvent the wheel as a roboticist; focus on what already works and align with ROS standardized conventions.
Technically, ROBOTCORE Framework implements the ROS 2 Hardware Acceleration Architecture and Conventions REP 2008 and supports the most popular hardware acceleration solutions and development kits to build robots with hardware acceleration and ROS. While doing so, ROBOTCORE Framework simplifies the ROS 2 development flow for accelerators, providing pre-packaged firmware artifacts that allow you to improve your robotics development productivity. With ROBOTCORE Framework, building accelerators takes just the following:
# 1. Create ROS 2 workspace
mkdir -p ~/ros2_ws/src; cd ~/ros2_ws
wget https://<your-customer-id-url>/humble_repos.ros
vcs import src --recursive < humble_repos.ros
# 2. Build your workspace for dev. machine arch
colcon build --merge-install
# 3. Source the overlay to enable ROBOTCORE™
source install/setup.bash
# 4. Build your workspace for embedded arch
# and build acceleration kernels altogether
colcon build --merge-install --mixin polarfireiciclekit
For more information about ROBOTCORE Framework and its origins, refer to the scientific paper co-authored between Acceleration Robotics and Harvard University.
ROS 2 Perception Graph: 2 nodes perception pipeline with Hardware Acceleration
The above graph shows that CPU + FPGA performs much faster as compared to the CPU + GPU combination. It provides low latency and high performance per watt, providing more value to customers.
Summary
Collaboration of Acceleration Robotics with Microchip led to a straight port of Yocto recipes of ROS 2 Humble to extend Microchip’s BSP to enable ROS.
Acceleration Robotics’ ROBOTCORE Framework and Microchip’s PolarFire SoC FPGA Icicle Kit put together a powerful combination of tools and IP Cores for robots that are ROS 2 API-compatible and ready to use and to increase your robot's performance, including latency, throughput and power efficiency.
A complete walkthrough of the process is described on the Acceleration Robotics web page. Commercial support is available through Acceleration Robotics services. You can also join the Git Hub community forum for ROS. For more information, you can register for the on-demand video of Robotics and ROS 2 in the PolarFire SoC FPGA on our Mi-V Unleashed webinar series page.
Acceleration Robotics, Oct 10, 2023
Tags/Keywords: Industrial and IoT
Commenti