Skip to content

UniAgent-Platform/swarmwalker.protobuf-messages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swarmwalker ProtoBuf Messages

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).

Usage

Installation

Before you can use this library:

Maven Project Configuration

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>

Gradle Project Configuration

dependencies {
    implementation 'org.swarmwalker.messages:protobuf-messages:1.0.0'
    implementation 'com.google.protobuf:protobuf-java:4.31.1'
}

Getting Started

Key Messages

Pose (core.proto)

Represents a 3D pose in space:

message Pose {
  float x = 1;
  float y = 2;
  float z = 3;
  float w = 4;
}

Generating Source Files from .proto

To generate source files (Java, Python, C#) from the Protobuf definitions, run:

$ ./gradlew clean generateProto

The generated files will be located under:

build/generated/source/proto/

Build the Library (Java)

Required: Protobuf Gencode/Runtime version 4.31.1

Check:

$ protoc --version
libprotoc 31.1

Execute:

$ ./gradlew clean build

These files are then compiled and packaged into a .jar file located in:

build/libs/

Publish to Local Maven Repository (Java)

To install the built .jar in your local Maven repo (~/.m2/repository):

$ ./gradlew publishToMavenLocal --warning-mode all

License

This 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors