![]() |
uav-digital-twin repositorydigitaltwin rqt_control rqt_network rqt_reward rqt_sensor rqt_state rqt_trajectory |
Repository Summary
Description | ROS 2 packages that implement dynamic structural health monitoring for a UAV via structural digital twin, formulated using a probabilistic graphical model |
Checkout URI | https://github.com/michaelkapteyn/uav-digital-twin.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2021-04-01 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
Name | Version |
---|---|
digitaltwin | 0.0.1 |
rqt_control | 0.1.0 |
rqt_network | 0.1.0 |
rqt_reward | 0.1.0 |
rqt_sensor | 0.1.0 |
rqt_state | 0.1.0 |
rqt_trajectory | 0.1.0 |
README
```
UAV Digital Twin via Probabilistic Graphical Models and ROS
Table of Contents
Description
This repository contains ROS 2 packages that implement dynamic structural health monitoring for a UAV via a digital twin imbued with a probabilistic graphical model.
This code is a companion to an academic research paper. If you use this work in an academic context, please cite the following publication(s):
Kapteyn, Michael G., Jacob V.R. Pretorius, and Karen E. Willcox. A Probabilistic Graphical Model Foundation for Enabling Predictive Digital Twins at Scale. arXiv preprint arXiv:2012.05841 (2020). https://arxiv.org/abs/2012.05841
Keywords: UAV, digital twin, graphical model, Dynamic Bayesian Network
Author & Maintainer: Michael Kapteyn, mkapteyn@mit.edu
This is research code, any fitness for a particular purpose is disclaimed.
Overview
digitaltwin package
This repository contains a ROS2 package called digitaltwin
. This package implements all the core functionality of the dynamic in-flight health-monitoring demonstration.
This package is a demonstrative application that illustrates how a general purpose Bayesian Network software package (we here use Pomegranate) can be used to implement our proposed graphical model for digital twins. We use ROS in order to dynamically build and leverage the graphical model, and illustrate how information is transferred between an asset and its digital twin.
At its core, the code is a simple two node ROS architecture:
The uav_asset
node is a simulated UAV asset. Its role is to acquire control inputs from the digital twin, progress the simulation one timestep, simulate sensor data accordingly, then pass this sensor data to the digital twin node.
- Functionality for the UAV is implemented in
src/digitaltwin/digitaltwin/UAV.py
The uav_twin
node is the UAV digital twin. Its role is to acquire sensor data from the UAV asset, decide which control input to issue, then pass this control input to the UAV asset. The digital twin does this by maintaining a probabilistic graphical model of the asset-twin system, as described in the accompanying paper.
- Functionality related to planning is in
src/digitaltwin/digitaltwin/planner.py
- Functionality related to the probabilistic graphical model is in
src/digitaltwin/digitaltwin/graphicalmodel.py
. In order to better understand how the graphical model is constructed and utilized, it is greatly encouraged that you first read and understand the Pomegranate Bayesian Network documentation.
Visualization packages
In addition to the core functionality, this repository also contains six additional rqt_gui plugins. These plugins allow you to visualize various quantities as the simulation progresses:
- rqt_state: Plots the digital states, and , versus time
- rqt_trajectory: Plots the digital states in state-space (i.e. vs. )
- rqt_sensor: Plots sensor data and quantity of interest (i.e. reference sensor data)
- rqt_control: Plots control inputs vs. time
- rqt_reward: Plots reward functions vs. time
- rqt_network: Plots the probabilistic graphical model nodes and edges
Installation
Building from Source
Dependencies
These packages have been tested under ROS2 Eloquent on Ubuntu 18.04.
Dependencies include:
- Robot Operating System 2 (ROS2) (middleware for robotics),
-
Python 3 (and standard packages such as
numpy
,json
,re
, etc.) - Pomegranate 0.13.0 (Python library used for Bayesian Network back-end)
Building
To build from source, clone the latest version from this repository (or unzip the file contents) into a ROS2 workspace (here called digitaltwin_ws
) and compile the package using
You should now have the directories digitaltwin_ws/install
and digitaltwin_ws/build
<!– ### Unit Tests
Run the unit tests with
catkin_make run_tests_ros_package_template
Static code analysis
File truncated at 100 lines see the full file