Skip to content

programming-digital-twins/LabBenchStudios-PDT-Unity

Repository files navigation

Programming Digital Twins - Lab Bench Studios PDT Unity Package

Overview

This is an EXPERIMENTAL RESEARCH package designed for use with Unity and other components related to my Building Digital Twins course at Northeastern University. The intent of this repository is to provide students with an experimental Digital Twin research environment for personal testing and experimentation.

For convenience to the reader, some of the basic functionality has already been implemented, with other key components requiring implementation by users of the repository (e.g., students taking my Building Digital Twins course).

Project Link: LabBenchStudios-PDT-Unity

Project Objectives

The LabBenchStudios-PDT-Unity research project has three primary objectives:

(1) Build a largely F/OSS Digital Twin framework that can work with other Programming Digital Twins projects and their repositories to sync live data, DTDL models, and a JSON-based constraint mapping layer, and render within a COTS physics sim engine (e.g., Unity 6).

(2) Use a digital twin asset's configuration data to auto-generate a GPT AI prompt to query one or more locally running LLM's to retrieve predictive maintenance recommendations for the specific system within the Digital Twin environment.

(3) Provide a baseline technology platform for my Northeastern University College of Engineering graduate students (and me) to learn and experiment with various Digital Twin use cases.

Helpful Links

PDT Kanban Board: Programming Digital Twins Requirements

Please see the following links for some helpful information about the PDT exercises and other associated repositories. Please note that many of the exercises and sample source code in this repository is based on some of the patterns and exercises from my book, Programming the Internet of Things Book.

Usage

In general, follow exercise instructions for the Digital Twin App (DTA) in the Programming Digital Twins Kanban Board. More specifically, read the following: NOTE: Check back regularly for version updates, as this package is under active development and is purely EXPERIMENTAL (e.g., perpetual 'alpha' mode and not released).

Installation (within Unity 6)

As a Unity Plugin built from your local repo (recommended)

  • See the instructions under 'Option 1 - Custom Build' at PDT-DTA-03-002

As a Unity Plugin from Git

Organization

If you're reading Programming the Internet of Things: An Introduction to Building Integrated, Device to Cloud IoT Solutions, you'll see some design similarities to the exercises described in each chapter and the source code contained within this repository. While the software components contained herein are written in C# and follow, they follow a similar design philosophy as that of the Java, or Gateway Device App, components written for the book and are part of my other course, Connected Devices.

Repository Navigation

This repository is comprised of the following key paths:

  • LabBenchStudios-PDT-Unity: All other assets are contained within this path.
    • Documentation: Contains package documentation.
    • Models: Contains both DTDL and type mapping JSON models.
      • Dtdl: Digital Twin Definition Language (DTDL) JSON models.
      • Types: JSON-based type and constraint mapping models.
    • Plugins: Contains relevant DLL dependencies (see Third Party Notices.md).
    • Runtime: Contains relevant Unity-specific prefabs and C# scripts.
      • ProgrammingDigitalTwins: Containing folder.
        • Prefabs: Unity-specific prefabs.
        • Scripts: Unity-specific C# scripts.
          • Unity: Namespace containing folder (to help avoid naming collisions).
            • Common: Base game object and utility classes.
            • Controller: Simple animation controller classes.
            • Dashboard: Simple dashboard controllers (3D embeddable).
            • Hud: Simple HUD controllers (2D display).
            • Manager: Primary system and keyboard manager components.
            • Model: Simple collision controller classes.
            • Sample: Sample threshold crossing animation controller classes.

NOTE: The directory structure and all files are subject to change based on feedback I receive from readers of my book and students in my IoT class, as well as improvements I find to be helpful for overall repo betterment.

Other things to know

Pull requests

PR's are disabled while the codebase is being developed.

Updates

Much of this repository, and in particular unit and integration tests, will continue to evolve, so please check back regularly for potential updates. Please note that API changes can - and likely will - occur at any time.

REFERENCES

This repository requires various Unity Technologies Inc. features and packages, and is intended to be installed within a Unity 6 environment.

This repository has external dependencies on other open source projects. I'm grateful to the open source community and authors / maintainers of the following libraries. More details can be found in Third Party Notices.md. References to this package's dependencies are as follows (as of 01 Jan 2025):

Unity Application Requirement Reference (not included - must be installed separately)

This package is dependent upon the Unity 6 Editor and Game Engine.

  • Unity Technologies Inc.: Unity 6
    • Reference: Unity Technologies Inc. Unity Editor. (2024) [Online]. Available: https://unity.com/.
    • Version: 6000.0.32f1
      • NOTE: This codebase and its references may function with other Unity Editor versions; however, all testing currently utilizes version 6000.0.32f1. This package is not intended to be used outside of a compatible Unity Editor environment.

Unity-Specific Dependencies (not included - must be installed separately)

Unity Feature Dependency References

This package requires the following Unity Features to be installed prior to this package's installation. NOTE: Other Unity-specific features may be required in the future.

Unity Package Dependency References

This package requires the following Unity packages to be installed prior to this package's installation. NOTE: Other Unity-specific packages may be required in the future.

Included Library (DLL) References (see the ./Plugins folder)

NOTE: This section and Third Party Notices.md will be updated if / when other dependencies are incorporated.

OTHER IMPORTANT NOTES

This code base is under active development.

If any code samples or other technology this work contains, describes, and / or is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.

LICENSE

Assets and Models: LICENSE-ASSETS. The repository's non-code artifacts LICENSE file (e.g., documentation, prefabs, etc.) These artifacts are contained within the ./Documentation, ./Models, and ./Runtime/ProgrammingDigitalTwins/Prefabs path.

Source Code: LICENSE-CODE. The repository's code artifacts LICENSE file (e.g., source code [mostly C#]). These artifacts are contained within this repository's ./Runtime/ProgrammingDigitalTwins/Scripts path.

Third Party Libraries: See REFERENCES above and Third Party Notices.md. The repository's DLL dependencies notices file. These artifacts are contained within this repository's ./Plugins path. These DLL's, along with the LBS.PdtCfwComponents.dll can also be built by the user following the installation guidelines in the Programming Digital Twins Client Framework Repository.

About

This repository contains the Programming Digital Twins Client Framework Components designed for use as a Unity3D plugin (Unity 6).

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-ASSETS.md
MIT
LICENSE-CODE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages