Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Digital Twin Playground

This is a project that provides a virtual environment for testing various motion control algorithms. It leverages the Bevy game engine and is implemented in the Rust programming language.

🚧 This project is in alpha stage and there is still work in progress.

The idea is to create a digital twin of a physical system, such as a robot or a drone, and test different control algorithms in a virtual environment. This can be useful for testing and validating control algorithms before deploying them to a physical system.

In the current version, the project provides a furuta pendulum system which is "embedded" in the code. The pendulum can be controlled using the keyboard.

The next steps are to import models from third-party software, such as Blender and control them by creating your own controller. The project will also support different types of joints and motors, as well as more complex interactions between joints. Which can be configured by the user and selecting the interaction between the joints and the motors in the user interface.

The user will be able to control the joints and motors in the scene, by creating a controller that can be attached to the joints and motors. The controller will be able to control the speed and precision of the joints and motors, as well as other settings. And the implementation of this controller can be done in any programming language that can communicate with the project by Protocol Buffers.

The user will be able to interact with the scene using the keyboard or mouse. The user will also be able to control the camera position and projection, as well as other settings in the scene.

Getting Started

This guide will help you get started with the project. It will guide you through the installation process, and show you how to run the project.

The project depends on Bevy, which requires some dependencies to be installed on your system. Please follow the official instructions for using Bevy here.

Currently it's only possible to run the project on Linux. The project has been tested on Ubuntu 22.04.

Follow the instructions in the Linux section to start the project.

Linux

  1. Install Rust by following the official installation guide.
  2. Clone this repository.
  3. Run git submodule update --init to update the submodules (which contains 3D models).
  4. Install just to facilitate command handling (e.g., cargo install just).
  5. (Optional) Run just setup-wasm to setup your environment for building the WebAssembly version of the project.
  6. Run just run-linux or just run-wasm to start the project.

Windows

🚧 Not supported yet.

Mac

🚧 Not supported yet.

User Interface

Controls

  • Left mouse button - rotate camera
  • Right mouse button - pan camera
  • Mouse wheel - zoom camera
  • B - enable/disable frames for elements
  • L - start/stop animation
  • U - enable/disable shadows

Architecture

🚧 Work in progress

Contributing

Contributions to this project are welcome! Please open an issue or a pull request if you have any ideas or improvements.

All contributions are subject to the Code of Conduct.

Roadmap

Phase 1 (v0.1.0):

  • Create a basic Bevy project and import the necessary dependencies.
  • Create a simple 3D scene with a camera and light.
  • Import a 3D model from a third-party software.
  • Display the 3D model in the scene.

Phase 2 (v0.2.0):

  • Implement a system for adding joints to imported models.
  • Implement a system for controlling joints with keyboard keys.
  • Add support for different types of joints (revolute, fixed, spherical, etc.).
  • Add support for attaching keyboard keys to motors.

Phase 3 (v0.3.0):

  • Implement more advanced features for controlling joints, such as speed and precision.
  • Add support for multiple joints in a single model.
  • Add support for nested joints.
  • Control spawn camera position and projection.

Phase 4 (v0.4.0):

  • Add support for more complex interactions between joints.
  • Add support for physics simulation of joints.
  • Add support for networking, so that multiple users can control the joints in a shared scene.

Phase 5 (v0.5.0):

  • Add additional features and polish, such as a user interface, documentation, and tests.

Phase 6 (v1.0.0):

  • Release the first stable version of the software.