event_detector_db_recording_plugin 1.0.0
|
⸻ Quick Start | Analysis Rules | Installation | Documentation | Research Article | Acknowledgements ⸻
event_detector_db_recording
is an action plugin for the ROS 2 event detector framework that allows to write data from buffer to a database. With this action plugin, you can automatically ...
In order to give an example, with this action plugin you can automatically ...
The example illustrates that the event detector framework is highly modular and customizable.
[!IMPORTANT]
This repository is open-sourced and maintained by the Institute for Automotive Engineering (ika) at RWTH Aachen University.
Advanced C-ITS Use Cases are one of many research topics within our Vehicle Intelligence & Automated Driving domain.
If you would like to learn more about how we can support your advanced driver assistance and automated driving efforts, feel free to reach out to us!
:email: ***opensource@ika.rwth-aachen.de***
[!TIP] Check out the examples repository to see the event detector and all of its action plugins in action!
The examples also give a good idea of potential use cases for the event detector.
The concrete detection of any specific event and the concrete action that should be triggered are implemented in analysis rules of event detector action plugins. Existing analysis rules of the database recording plugin are listed here. We highlight that the action plugin is easily extensible with new developer-defined analysis rules, see *How to implement a custom analysis rule*.
Analysis Rule | Purpose |
---|---|
`RecordAllRule` | record all buffered data to database |
You can integrate the event detector with database recording plugin into your existing ROS 2 workspace by cloning the repository, installing all dependencies using rosdep, vcstool, and a custom script for external dependencies, and then building from source.
The event detector with database recording plugin can then be launched.
The event detector with database recording plugin is also available as a Docker image, containerized through docker-ros.
Browsable Doxygen code documentation is available here.
Analysis rules are separately documented, see *Analysis Rules*.
Subscriptions for buffering data are specified via the core parameter client_params.<CLIENT_NAME>.data_type_params.<DATA_TYPE>.topics
. Analysis rules may define additional subscribers.
None by default. Analysis rules may define additional publishers.
Parameters of the core event detector are documented here. All database recording plugin rules additionally define the following parameters under rule_params.<RULE_NAME>.parameters
. Analysis rules may define more parameters.
Parameter | Type | Default | Description | Options |
---|---|---|---|---|
database.name | string | db | database name | |
database.host | string | localhost | database host | |
database.port | int | 27017 | database port | |
database.user | string | \ilinebr </td> <td class="markdownTableBodyNone"> database user \ilinebr </td> <td class="markdownTableBodyNone"> \ilinebr </td> </tr> <tr class="markdownTableRowOdd"> <td class="markdownTableBodyNone"> `database.pass` \ilinebr </td> <td class="markdownTableBodyNone"> `string` \ilinebr </td> <td class="markdownTableBodyNone"> | database user password | |
database.large_data_root | string | `\ilinebr </td> <td class="markdownTableBodyNone"> directory for large data storage (see [*Supported data types*](#supported-data-types)) \ilinebr </td> <td class="markdownTableBodyNone"> \ilinebr </td> </tr> <tr class="markdownTableRowOdd"> <td class="markdownTableBodyNone"> database.dry_run\ilinebr </td> <td class="markdownTableBodyNone"> bool\ilinebr </td> <td class="markdownTableBodyNone"> false` | whether to perform a dry run (no data will be stored) |
The database recording plugin natively supports all ROS message types supported by the core event detector, see Supported data types.
The database recording plugin has the notion of large data types. Data of large data types is not directly stored in the database, but is written to disk instead. To give an example, sensor_msgs/msg/Image
messages are not directly stored in the database, but images are written to PNG files on disk instead. What is written to the database, are corresponding messages of type event_detector_db_recording_msgs/msg/ImageFile
, which store the file location on disk in the database. All large data types define a corresponding replacement data type in datatypes.macro
and implement the writing to disk behavior in the DatabaseInterface
.
In general, follow the generic instructions for implementing a custom analysis rule in the event detector framework. The event_detector_db_recording_plugin::TemplateRule
is a good point to get started with an analysis rule for the database recording plugin.
Note that the TemplateRule
inherits event_detector_db_recording_plugin::RecordingRule
instead of directly inheriting event_detector::AnalysisRule
. The abstract RecordingRule
implements the entire functionality for interfacing with a MongoDB database. This way, concrete analysis rules in the database recording plugin only need to implement the event detection by overriding event_detector::AnalysisRule::evaluate()
(e.g., event_detector_db_recording_plugin::TemplateRule::evaluate()
) and have it call event_detector_db_recording_plugin::RecordingRule::trigger(const EvaluationResult&)
at the end to trigger storage.
If you are interested in the role of event detection in modern automated driving systems and Cooperative Intelligent Transport Systems (C-ITS), please check out our associated research article on the topic and consider citing it if you are using the event detector for your own research.
Event Detection in C-ITS: Classification, Use Cases, and Reference Implementation
*(ResearchGate)*
Lennart Reiher, Bastian Lampe, Lukas Zanger, Timo Woopen, Lutz Eckstein
Institute for Automotive Engineering (ika), RWTH Aachen UniversityAbstract – The transition from traditional hardware-centric vehicles to software-defined vehicles is largely driven by a switch to modern architectural patterns of software, including service orientation and microservices. Automated driving systems (ADS), and even more so, Cooperative Intelligent Transport Systems (C-ITS), come with requirements for scalability, modularity, and adaptability that cannot be met with conventional software architectures. The complexity and dynamics of future mobility systems also suggest to employ ideas of the event-driven architecture paradigm: distributed systems need to be able to detect and respond to events in real-time and in an asynchronous manner. In this paper, we therefore stress the importance of data-driven event detection in the context of ADS and C-ITS. First, we propose a classification scheme for event-detection use cases. We then describe a diverse set of possible use cases and apply the classification scheme to a selection of concrete, innovative examples. Last, we present a modular event detection software framework that we publish as open-source software to foster further research and development of complex C-ITS use cases, but also for robotics in general.
This work is accomplished within the projects 6GEM (FKZ 16KISK036K), autotech.agil (FKZ 01IS22088A), and UNICAR.agil (FKZ 16EMO0284K). We acknowledge the financial support for the projects by the Federal Ministry of Education and Research of Germany (BMBF).