The Protobuf schemas in this project define messages that serve as a bidirectional communication interface for the Swarmwalker demo between:
- The VR-based user interface,
- The digital twin model (maintains a bigraph-based model of the CPSp), and
- The Crazyflie drones, either physical or simulated (e.g., Gazebo. Webots).
These messages enable State Streaming (e.g., Position) or Model Synchronization (e.g., interaction also keeps the digital twin in sync with the physical states at runtime).
Installation
Before you can use this library:
- For Python and C# you need to generate the source files and copy these into your project.
- For Java the dependency can be used via Maven or Gradle, when you Publish to Local Maven Repository.
For Maven-based project add the dependency into the project's pom.xml:
<dependency>
<groupId>org.swarmwalker.messages</groupId>
<artifactId>protobuf-messages</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>4.31.1</version>
</dependency>dependencies {
implementation 'org.swarmwalker.messages:protobuf-messages:1.0.0'
implementation 'com.google.protobuf:protobuf-java:4.31.1'
}Represents a 3D pose in space:
message Pose {
float x = 1;
float y = 2;
float z = 3;
float w = 4;
}To generate source files (Java, Python, C#) from the Protobuf definitions, run:
$ ./gradlew clean generateProtoThe generated files will be located under:
build/generated/source/proto/Required: Protobuf Gencode/Runtime version 4.31.1
Check:
$ protoc --version
libprotoc 31.1Execute:
$ ./gradlew clean buildThese files are then compiled and packaged into a .jar file located in:
build/libs/To install the built .jar in your local Maven repo (~/.m2/repository):
$ ./gradlew publishToMavenLocal --warning-mode allThis project is licensed under the Apache License 2.0.
You are free to use, modify, and distribute this software in accordance with the license terms.