Using ROS2 Layer and APIs
1. Overview
This application note explains how to use the ROS2 APIs, and the ROS2 layer in general, in the Emcraft software distribution for the Renesas RZ/V2H SoC.
2. Understanding ROS2 Layer
2.1. High-level Overview
While the Renesas “pristine” distribution provides the meta-rzv2-ros
Yocto meta-layer, which makes a subset of the ROS2 packages available for building and integration into the target software image, the Emcraft software distribution provides the Ubuntu compatibility layer (meta-renesas-desktop)
. The Ubuntu compatibility layer provides the ability to install the pre-built ROS2 packages from the official ROS2 repository into the target software image.
In addition to the official ROS2 packages, Emcraft has developed a number of custom ROS2 packages, which are used to provide a ROS2 API to various software components developed by Emcraft and Emcraft’s partners. One example of such a custom ROS2 package is the ROS2 interface to the PMD ToF (3D) Camera “Royale” stack.
2.2. Ubuntu ROS2 Packages
The Emcraft software distribution installs to the target image the following standard ROS2 packages from the Ubuntu distribution:
ROS2 Package | Version | Summary | Notes |
---|---|---|---|
| 1.2.1-1 | Messages and service definitions common among all ROS actions |
|
| 1.3.6-1 | The | A suite of packages. |
| 0.10.0-3 | The ROS specific |
|
| 1.4.0-2 | C++ API to access the |
|
| 1.4.0-2 | Python API to access the |
|
| 0.12.9-1 | Common API for the |
|
| 0.14.0-4 | The parser for the manifest files in the |
|
| 1.15.0-1 | A set of simple math utilities to work with angles |
|
| 3.8.5-1 | The Behavior Trees core library |
|
| 3.0.2-3 | A bond allows two processes, A and B, to know when the other has terminated, either cleanly or by crashing | A suite of packages |
| 1.2.1-1 | Message and service definitions for types defined in the OMG IDL Platform Specific Model |
|
| 3.1.7-1 | Routines for reading and writing camera calibration parameters |
|
| 3.1.7-1 | A C++ interface for camera calibration information |
|
| 2.0.9002-2 | Real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations | A suite of packages |
| 2.2.0-3 | A ROS-independent package for loading plugins during runtime and the foundation of the higher level ROS |
|
| 1.2.1-1 | Message and service definitions for managing composable nodes in a container process |
|
| 1.4.1-1 | Wrapper around |
|
| 4.4.0-1 | Base messages and actions useful for controlling robots |
|
| 1.1.12-1 |
|
|
| 3.2.1-1 |
|
|
| 0.10.3-1 | Performant and robust open-source DDS implementation |
|
| 0.20.3-1 | C++ nodes which were previously in the |
|
| 4.2.3-1 | Some diagnostics related message and service definitions |
|
| 3.1.2-1 | Tools for easily updating diagnostics |
|
| 0.5.0-1 | ROS 2 Domain Bridge |
|
| 0.10.0-3 | A tool to coordinate unique |
|
| 1.1.12-1 | DWB controller | A suite of packages |
| 3.7.60-1 | Wrapping version of the ROBOTIS |
|
| 1.0.0-4 | A set of |
|
| 0.1.1-4 | Exports a custom |
|
| 0.9.3-2 | Message and service definitions used by the examples |
|
| 1.0.24-2 | CDR serialization implementation |
|
| 2.6.6-1 |
|
|
| 2.2.2-2 |
|
|
| 1.2.0-3 | Foonathan/memory vendor package for Fast-RTPS |
|
| 2.1.3-2 | Generic definitions of geometric shapes and bodies |
|
| 4.2.3-1 | Some geometry related message definitions |
|
| 0.25.5-1 | A meta-package to bring in the default packages second generation Transform Library in |
|
| 1.10.9004-4 | The package provides |
|
| 1.10.9004-4 | The package provides |
|
| 2.35.0-1 |
|
|
| 2.0.4-3 | ROS package for LDS (HLS-LFCD2) |
|
| 2.0.3-1 | Eclipse | A suite of packages. |
| 0.0.2-2 |
|
|
| 0.0.2-2 |
|
|
| 3.2.1-1 |
|
|
| 3.1.7-1 |
|
|
| 2.1.3-1 | Filter which fuses angular velocities, accelerations, and (optionally) magnetic readings from a generic IMU device into an orientation |
|
| 2.3.2-2 | 3D interactive marker communication library for |
|
| 2.6.4-1 | The Kinematics and Dynamics Library (KDL) defines a tree structure to represent the kinematic and dynamic parameters of a robot mechanism |
|
| 2.4.0-2 | This package contains a class for converting from a 2D laser scan as defined by sensor_msgs/LaserScan into a point cloud as defined by |
|
| 1.0.4-1 | ROS | A suite of packages |
| 0.19.6-1 | ROS specific extensions to the |
|
| 3.1.1-1 | Wrapper around |
|
| 2020.5.29-4 | The |
|
| 1.0.7-3 |
|
|
| 1.3.1-3 |
|
|
| 2.54.1-1 | Library for controlling and capturing data from the Intel(R) RealSense(TM) D400 devices |
|
| 1.3.1-1 | Lightweight aggregation utilities to collect statistics and measure message metrics |
|
| 1.2.2-2 | Vendored version of |
|
| 1.2.1-1 | Some lifecycle related message and service definitions |
|
| 2.1.0-3 | Messages commonly used in mapping packages |
|
| 4.3.3-2 | A set of ROS2 message filters which take in messages and may output those messages at a later time, based on the conditions that filter needs met |
|
| 1.1.12-1 | ROS2 Navigation Stack | A suite of packages |
| 1.9.8-1 | The |
|
| 2.0.0-3 | Messages and serializations / conversion for the |
|
| 1.6.0-1 | Free sampling-based motion planning library |
|
| 0.2.5-1 | Wrapper around |
|
| 2.0.2-2 | Commonly needed Python modules, used by Python software developed at OSRF |
|
| 2.4.0-4 | PCL (Point Cloud Library) ROS interface stack | A suite of packages. |
| 5.1.0-3 | Tools for writing and dynamically loading plugins using the ROS build infrastructure |
|
| 0.10.0-2 |
|
|
| 1.1.2-1 | Python bindings for Qt |
|
| 2.2.2-12.2.2-1 | Infrastructure for an integrated graphical user interface based on Qt |
|
| 2.2.2-1 | Foundation for C++-bindings for |
|
| 2.0.1-3 | Wrappers for generating floating point values, integers, quaternions using boost libraries |
|
| 5.3.6-1 | The ROS client library common implementation | A suite of packages. |
| 1.2.1-1 | The ROS client library common interfaces |
|
| 2.3.1-1 | Interface that |
|
| 2.3.1-1 |
|
|
| 16.0.7-1 | The ROS client library in C++ | A suite of packages. |
| 2.4.1-1 | Package containing the Python client | A suite of packages. |
| 5.1.4-1 | Package containing various utility types and functions for C |
|
| 4.54.1-1 | RealSense camera package allowing access to Intel SR300 and D400 3D cameras | A suite of packages. |
| 3.1.1-1 | This package retrieves data from url-format files such as |
|
| 6.1.1-1 | ROS middleware API |
|
| 1.3.4-1 | ROS middleware interface using Eclipse CycloneDDS in C++ |
|
| 1.6.0-2 | Common interface between DDS implementations of ROS middleware |
|
| 6.2.5-1 | ROS middleware interface using | A suite of packages. |
| 2.8.2-1 | Proxy implementation of the ROS 2 Middleware Interface |
|
| 6.1.1-1 |
|
|
| 3.0.2-2 | This package take the joint angles of a robot as input, and publishes the 3D poses of the robot links to |
|
| 3.2.2-1 | Environment variables |
|
| 1.0.2-2 | Prefix level environment files for ROS 2 packages |
|
| 0.18.7-1 | Framework for ROS2 command line tools | A suite of packages. |
| 0.15.8-1 | C++ ROSBag2 client library | A suite of packages. |
| 1.2.1-1 | Messages relating to the ROS Computation Graph |
|
| 3.1.5-2 | API and scripts to parse | A suite of packages. |
| 1.2.0-2 | A configuration package defining the default ROS interface generators | A suite of packages. |
| 2.0.1-1 | Generate the type support for C++ messages | A suite of packages. |
| 0.2.1-2 | Package containing various utility types and functions for Python |
|
| 0.21.1-1 | RTAB-Map's standalone library |
|
| 11.2.9-1 | 3D visualization tool for ROS |
|
| 4.2.3-1 | Some sensor data related message and service definitions |
|
| 4.2.3-1 | Sme message definitions which describe geometric shapes |
|
| 0.15.8-1 | Vendor package for concurrent queues from |
|
| 2.6.6-1 | This package provides a sped up improved slam karto with updated SDK and visualization and modification toolsets |
|
| 3.0.2-3 | The State Machine Compiler (SMC) from SMC: The State Machine Compiler converts a language-independent description of a state machine into the source code to support that state machine |
|
| 1.3.1-1 | Wrapper around spdlog, providing nothing but a dependency on |
|
| 0.15.8-1 | SQLite 3 vendor package |
|
| 2.0.4-1 | Parser for Semantic Robot Description Format (SRDF) |
|
| 1.2.1-1 | Message definitions for reporting statistics for topics and system resources |
|
| 4.2.3-1 | Some standard message definitions |
|
| 4.2.3-1 | Some stereo camera related message definitions |
|
| 0.1.1-3 | Public domain Tango icons for non-linux systems (Tango Icon Library) from the Tango Desktop Project |
|
| 0.25.5-1 |
|
|
| 0.8.3-2 |
|
|
| 0.7.6-1 | Wrapper around |
|
| 4.1.1-1 | Tracing wrapper for ROS2 |
|
| 4.2.3-1 | A package containing some robot trajectory message definitions |
|
| 2.1.5-1 | ROS 2 packages for | A suite of packages. |
| 2.2.1-3 | ROS messages for universally unique identifiers |
|
| 2.6.0-2 | This package contains a C++ parser for the Unified Robot Description Format (URDF), which is an XML format for representing a robot model |
|
| 2.6.0-2 | This package contains a C++ base class for URDF parsers |
|
| 3.0.2-2 | A library to access URDFs using the DOM model |
|
| 1.0.6-2 | C++ headers for URDF |
|
| 1.2.1-1 | Python implementation of the URDF parser. |
|
| 0.6.2-1 | A ROS 2 camera driver using |
|
| 2.4.0-1 | Basic ROS support for the Velodyne 3D LIDARs | A suite of packages. |
| 3.2.1-1 | Packages for interfacing ROS2 with OpenCV, a library of programming functions for real time computer vision |
|
| 4.2.3-1 | A package containing some visualization and interaction related message definitions |
|
| 8.0.2-1 | Wrapper around |
|
| 0.15.8-1 |
|
|
2.3. Emcraft ROS2 Packages
In addition to the Ubuntu ROS2 packages listed in the previous section, the Emcraft software distribution installs the following custom ROS2 packages. Those packages were developed by Emcraft to facilitate integration of the various custom software packages, developed by Emcraft and Emcraft’s partners, with the ROS2 APIs:
| 0.1.0 | PMD camera ROS2 message definitions |
|
| 0.3.0 | PMD camera ROS2 node |
|
| 0.3.0 | Bring-up scripts and configuration for the iRobot Create3 navigation |
|
2.4. Understanding ROS2 Build Process
Emcraft makes use of a separate build environment to build the custom ROS2 packages integrated into the Emcraft software distribution for the RZ/V2H SoC.
The build environment is based on the GitHub - ros/meta-ros: OpenEmbedded Layers for ROS 1 and ROS 2 Yocto meta-layer and is configured to build packages for the ARM64 and AMD64 architectures. The built binary packages are then published via a private Debian package archive. The Emcraft software distribution for the RZ/V2H SoC has the PPA included to the APT source list.
3. Verifying ROS2 Layer
3.1. Running Renesas ROS2 Demo
Step through the following procedure to run the Renesas ROS2 “talker-listener” demo:
Open a terminal window and login onto the RZ/V2H EVK board using
ssh
:<terminal 1>$ ssh user@<evk IP>
Run the talker demo application:
<terminal 1>$ ros2 run demo_nodes_cpp talker
The application will start sending ‘hello world’ prints with logging:
[INFO] [1701963711.614928791] [talker]: Publishing: 'Hello World: 1' [INFO] [1701963712.614826500] [talker]: Publishing: 'Hello World: 2' ...
Open another terminal window and login onto the EVK:
Verify that the
chatter
topic is present:Run the listener demo application:
The application will start receiving ‘hello world’ messages with logging:
NOTE: The steps 4-5 can be done on any host with installed ROS2, not just the EVK itself. The ROS2 uses the DDS
(RTPS
) protocol for message transmission, which can cross host boundaries and reach other hosts on the LAN.
3.2. Using ROS2 Interface to the PMD ToF (3D) Camera
Step through the following procedure to demonstrate use of the ROS2 interface to the PMC ToF camera:
Open a terminal window and login onto the RZ/V2H EVK board using
ssh
:Connect the PMD ToF Flexx2 camera to the EVK USB interface.
Run the ROS2 camera node wrapper:
The node will start with providing logs and information on the detected PMD camera:
Open another terminal window and login onto the EVK:
Verify that the camera related topics are present:
Capture the camera information via the
pmd_camera/info
topic:The application will start receiving camera info message:
Press
Ctrl-C
to exit the capturing.Capture the point cloud messages from the camera via the
pmd_camera/cloud
topic:The application will start receiving camera info message:
Press
Ctrl-C
to exit the capturing.
NOTE: The steps 4-7 can be done on any host with installed ROS2, not just the EVK itself. The ROS2 uses the DDS
(RTPS
) protocol for message transmission, which can cross host boundaries and reach other hosts on the LAN.