Skip to content

bigraph-toolkit-suite/bigraphs-by-examples.streaming-bigraphs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bigraphs by Examples: Streaming Attributes (ROS2 to Ecore/XMI)

Software Stack

  • Java >=17 + Maven >=3.8.7
  • Spring 3.3.5
  • Bigraph Framework 2.3.1
  • BDSL 2.0.1
  • CDO for Spring Data 0.7.5

Optional

  • CDO Explorer: to view and modify the bigraph in the database
    1. Download CDO Explorer via the Eclipse Installer. Use Eclipse Version 2022-12 (4.26.0), which supports CDO protocol version 48. Eclipse IDE version 2023-09 supports only CDO protocol version 49.
    2. Any Eclipse IDE with CDO support, must support CDO protocol version 48

Architecture

High-level Architecture

Getting Started

ROS2

Start the rosbridge websocket server to allow for communication between ROS2 and Java

$ ros2 launch rosbridge_server rosbridge_websocket_launch.xml

Streaming Demo Application

You have two options:

Via the IDE (Eclipse, IntelliJ IDEA, Visual Code, ...)

  • Run a method of src/test/java/org.example/CDOStandaloneServerTest.java in the test folder
  • Run the class src/main/java/org/example/Application.java
  • Wait until you see in the terminal: Application has successfully started ...

Via the Terminal

In the 1. Terminal:

$ ./mvnw test -DrunDisabledTests=true -Dtest="CDOStandaloneServerTest#run_server_test_01"

In the 2. Terminal:

$ ./mvnw spring-boot:run

Wait until you see in the terminal: Application has successfully started ...

Triggering the Rule

Publish messages on the ROS 2 topic:

# A sufficient low value
$ ros2 topic pub /echo std_msgs/Int16 "{data: 123}"

# A sufficient high value
$ ros2 topic pub /echo std_msgs/Int16 "{data: 2000}"

Screenshot

conditional-attribute-rule.png