![]() |
EduArt Sensor Ring Library 3.0.1
|
The public interface has three measurement related components:
In addition to the measurement related interface the library provides a logger interface:
The EduArt Sensor Ring is a system that collects and combines measurements from multiple individual sensors. The individual sensors are daisy chained together in series and share a communication interface and a power supply. The chain of sensor is terminated by a master device at one end e.g. a Raspberry Pi or a CAN to USB converter. It is possible to use multiple communication interfaces to distribute the sensor data and enable the use of more sensors simultaneously. The following class diagram illustrates the topology and the reflection of the hardware layers in the library.
Each of the core classes of the library has its own parameter set which is shown in the above class diagram. The parameters are designed to mirror the private internal structure of the library. This means the ManagerParams has one element RingParams and the RingParams has a vector of BusParams which mirrors the 1 to n relationship between SensorRing and SensorBus. Each SensorBus has a vector of BoardParams, which again represents the real system where multiple boards can be connected on one interface.
The parameters have to be initialized and configured externally and passed to the MeasurementManager as constructor argument upon creation. Once a MeasurementManager has been instantiated the parameters can no longer be changed.
⚠️ Be careful to configure the actual number of connected communication interfaces (where each interface is one SensorBus) and the correct number of sensor boards per interface. If the ManagerParams parameter enforceTopology is set to true the system will only start if the configuration matches the connected hardware exactly.
The Sensor Ring library includes both C++ examples and Python examples that show how to use it in custom projects.
The library is written in C++ and it is recommended to use the C++ interface of the library for performance reasons.
The following examples show how to use the Sensor Ring library in your own C++ project:
⚠️ To use the depth_map C++ example on Windows you might first need to enable UTF-8 support for your current terminal session with this command: $OutputEncoding = [Console]::OutputEncoding = New-Object System.Text.UTF8Encoding.
ℹ️ The library can be built with -DSENSORRING_BUILD_PYTHON_BINDINGS=ON option to generate python bindings.
⚠️ To use the sensorring python package you have to append the location of the package to your PYTHONPATH environment variable.
Linux
Windows
The following examples show how to use the Sensor Ring library in your own Python project:
![]() The depth_map example | ![]() The depth_view example. |
The use of the Python interface is similar to that of the C++ interface with a few exceptions that are explained below.
C++ has the two client interface classes MeasurementClient and LoggerClient. With the generated Python bindings it is not possible to inherit from both base classes in one python class simultaneously. Only the first base class is handled correctly, the second one is not recognized correctly and throws an error when trying to registering it. For this reason the Python interface has the additional SensorringClient class, which combines the callbacks from both MeasurementClient and LoggerClient in one class.
⚠️ Use the SensorringClient base class in Python to inherit from both MeasurementClient and LoggerClient.
⚠️ It is strongly recommended to clone measurements to numyp arrays before manipulating them. This is shown in the onRawTofMeasurement() callback below.
Below is a minimal example that shows the Python specialities discussed above:
In addition the the examples, the Sensor Ring library has provides for ROS and ROS2 which make the integration of the EduArt Sensor Ring in existing projects easy.
The Ros1 wrapper publishes the Time of Flight Sensor measurements as PointCloud2 message and the thermal measurements as Image message. In addition the pose of each sensor is published as a static transformation.
ℹ️ Using the ROS Wrapper does not require you to install the Sensor Ring Library manually. The ROS build will automatically fetch the library if it is not detected by CMake.
ROS Native
ℹ️ The parameters of the Sensor Ring are defined in the native ROS parameter file and have to be adjusted to match the actual sensor configuration.
ROS in Docker
ℹ️ The parameters of the Sensor Ring are defined in the Docker parameter file and have to be adjusted to match the actual sensor configuration.
The Ros2 wrapper publishes the Time of Flight Sensor measurements as PointCloud2 message and the thermal measurements as Image message. In addition to the sensor messages the pose of each sensor is published as a static transformation.
ℹ️ Using the ROS2 Wrapper does not require you to install the Sensor Ring Library manually. The ROS2 build will automatically fetch the library if it is not detected by CMake.
ROS2 Native
ℹ️ The parameters of the Sensor Ring are defined in the native ROS2 parameter file and have to be adjusted to match the actual sensor configuration.
ROS2 in Docker
ℹ️ The parameters of the Sensor Ring are defined in the Docker parameter file and have to be adjusted to match the actual sensor configuration.
![]() 3D point cloud from the sensor system on a mobile robot visualized with Rviz | ![]() 3D map of a corridor recorded with the sensor system using Octomap. |