kbirken / PPD

Physical Product Developer with MPS
0 stars 1 forks source link

PPD

Physical Product Developer with MPS

Setup

Download and install MPS 2021.3.2 from this JetBrains site for your favorite operating system and hardware architecture.

This project will use the open-source platform extensions mbeddr.platform and iets3.opensource. We are not using the latest MPS version in order to have stable platform components available.

Building the project

The project comes with a gradle build. Open a command shell, move to the root folder of this repository (where youu also found this README), and start the build:

Alternative: Poor man's build

Instead of running the gradle build, you can also run the script download_deps.sh to just download dependencies from itemis artifacts server. After the download is completed, open the MPS IDE and build all languages manually.

Tool architecture

The PPD tool has two architectural layers:

Simulating 2D physical worlds

The org.itemis.world2d is a modeling language for 2D physical worlds. World2D nodes can be simulated using the Box2D rigid body physics engine (in its jbox2d version, see links below). This engine has been used for implementing some (in)famous games, including Minecraft and Angry Birds.

Worlds can be be created consisting of rigid bodies like boxes and circles. These elements can be connected via joints. See MyWorld2D for a very simple example.

The simulation can be started and stopped using the context menu on any World2D root node.

Modeling mechanical products

org.itemis.phydev is a language for mechanical products and the underlying mechanical solutions. It transforms to org.itemis.world2d, thus allowing the simulation of these physical mechanisms. You can either transform a Solution node to a World2D and use the resulting root node for running the simulation, or run the simulation directly by using the context menu on a Solution root node.

The modeling language consists of the following root nodes:

The requirements of a product can be checked via the intention "Check Requirements". The repository contains the example product Hori2000. Its main feature is to allow moving a 2D point horizontally within a given accuracy. Four different solutions can be used to realize this mechanical product.

Theory

Theory (mechanics):

Implementation