Skip to content

Commit

Permalink
Workflow update
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Gustavo Nardin committed Jan 11, 2022
2 parents 7ddb7ce + ed2a18f commit 2eb8c76
Show file tree
Hide file tree
Showing 134 changed files with 1,687 additions and 13,692 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Publish Asciidoc Documentation
name: asciidoctor-ghpages

on:
push:
paths:
Expand All @@ -23,4 +21,4 @@ jobs:
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
# `rcrs-adf-sample` RCRS Agent Development Framework (Sample)
# `adf-sample-agent-java` Agent Development Framework Sample Agent Java

(Linux) Instructions to download, build and run the sample implementation using the Agent Development Framework (ADF)

## 1. Software Pre-Requisites

- Git
- Gradle
- OpenJDK Java 11+
* Git
* OpenJDK Java 17
* Gradle

## 2. Download

```bash

$ git clone https://github.com/roborescue/rcrs-adf-sample.git
$ git clone https://github.com/roborescue/adf-sample-agent-java.git
```

## 3. Compile

```bash

$ cd adf-sample-agent-java

$ ./gradlew clean

$ ./gradlew build
```

## 4. Execute

The `rcrs-adf-sample` is a sample team implementation for the RCRS (`rcrs-server`) using the ADF core (`rcrs-adf-core`).
The `adf-sample-agent-java` is a sample team implementation for the RCRS (`rcrs-server`) using the ADF core (`adf-core-java`).

To run the `rcrs-adf-sample`, first the `rcrs-server` must be running (Instructions of how to download, compile and run the `rcrs-server` are available at <https://github.com/roborescue/rcrs-server>).
To run the `adf-sample-agent-java`, first the `rcrs-server` must be running (Instructions of how to download, compile and run the `rcrs-server` are available at <https://github.com/roborescue/rcrs-server>).

After start the `rcrs-server`, open a new terminal window and execute

```bash

$ cd rcrs-adf-sample
$ cd adf-sample-agent-java

$ ./launch.sh -all
```
Expand Down
59 changes: 42 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,65 @@ plugins {
id 'java'
}

sourceCompatibility = '11'
targetCompatibility = '11'
version = '1.5'
defaultTasks 'build'

group = 'com.github.roborescue'

sourceCompatibility = '17'
targetCompatibility = '17'
version = '4.0'

dependencies {
implementation fileTree( dir: 'library', include: '**/*.jar', exclude: '**/*-source.jar' )
implementation 'com.github.roborescue:rcrs-server:master-SNAPSHOT'
implementation 'com.github.roborescue:adf-core-java:master-SNAPSHOT'

implementation 'log4j:log4j:1.2.17'

testImplementation 'junit:junit:4.12'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}

repositories {
mavenCentral()
}

sourceSets {
main {
java {
srcDirs = [ 'src' ]
}
maven {
url = 'https://sourceforge.net/projects/jsi/files/m2_repo'
}
maven {
url = 'https://repo.enonic.com/public/'
}
maven {
url 'https://jitpack.io'
}
}

test {
useJUnit()
useJUnitPlatform()
}

javadoc {
options {
encoding = 'UTF-8'
addStringOption('Xdoclint:none', '-quiet')
}
}

clean {
doFirst {
delete file( new File( rootDir, 'bin' ) )
delete file( new File( rootDir, 'build' ) )
delete file( new File( rootDir, 'precomp_data' ) )
delete file( new File( rootDir, 'test-results' ) )
}
}

clean.doFirst {
delete file( new File( rootDir, 'bin' ) )
delete file( new File( rootDir, 'precomp_data' ) )
delete file( new File( rootDir, 'test-results' ) )
[compileJava, compileTestJava].each {
it.options.encoding = 'UTF-8'
it.options.compilerArgs += [ '-Xlint:unchecked', '-Xlint:deprecation' ]
}

task launch(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'adf.Main'
mainClass = 'adf.core.Main'
maxHeapSize = '2048m'
}
20 changes: 20 additions & 0 deletions config/develop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"ActionFireFighting.refill.completed": 10,
"ActionFireFighting.refill.request": 1,
"ActionFireFighting.rest": 100,
"ActionFireRescue.rest": 100,
"ActionExtClear.forcedMove": 3,
"ActionExtClear.rest": 100,
"ActionTransport.rest": 100,
"ActionExtMove.rest": 100,
"SampleBuildingDetector.sendingAvoidTimeClearRequest": 5,
"SampleBuildingDetector.sendingAvoidTimeReceived": 3,
"SampleBuildingDetector.sendingAvoidTimeSent": 5,
"SampleBuildingDetector.moveDistance": 40000,
"SampleHumanDetector.sendingAvoidTimeClearRequest": 5,
"SampleHumanDetector.sendingAvoidTimeReceived": 3,
"SampleHumanDetector.sendingAvoidTimeSent": 5,
"SampleHumanDetector.moveDistance": 40000,
"CommandPickerAmbulance.scoutDistance": 40000,
"CommandPickerFire.scoutDistance": 40000
}
22 changes: 13 additions & 9 deletions config/launch.cfg
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
kernel.host: localhost
kernel.port: 7000
kernel.port: 27931

team.name: sample_team

adf.launcher.precompute: 0

adf.debug.flag: 0

adf.develop.flag: 0
adf.develop.filename: data/develop.json
adf.develop.filename: config/develop.json
#adf.develop.data:

adf.team.office.ambulance.count: -1
adf.agent.moduleconfig.filename: config/module.cfg
#adf.agent.moduleconfig.data:

adf.team.platoon.ambulance.count: -1
adf.team.office.fire.count: -1
adf.team.platoon.fire.count: -1
adf.team.office.police.count: -1
adf.team.platoon.police.count: -1

adf.agent.moduleconfig.file: config/module_sample.cfg
#adf.agent.moduleconfig.data:

adf.launcher.precompute: 0
adf.team.office.ambulance.count: -1
adf.team.office.fire.count: -1
adf.team.office.police.count: -1
185 changes: 100 additions & 85 deletions config/module.cfg
Original file line number Diff line number Diff line change
@@ -1,85 +1,100 @@
Team.Name: test_team

TacticsAmbulanceTeam.HumanDetector : test_team.module.complex.self.TestHumanDetector
TacticsAmbulanceTeam.Search : test_team.module.complex.self.TestSearchForFire

TacticsFireBrigade.BuildingDetector : test_team.module.complex.self.TestBuildingDetector
TacticsFireBrigade.Search : test_team.module.complex.self.TestSearchForFire

TacticsPoliceForce.RoadDetector : test_team.module.complex.self.TestRoadDetector
TacticsPoliceForce.Search : test_team.module.complex.self.TestSearchForFire

TestBuildingDetector.Clustering : adf.sample.module.algorithm.SampleKMeans
TestRoadDetector.PathPlanning : test_team.module.algorithm.AStarPathPlanning
TestHumanDetector.Clustering : adf.sample.module.algorithm.SampleKMeans

TestSearch.PathPlanning.Ambulance : test_team.module.algorithm.AStarPathPlanning
TestSearch.PathPlanning.Fire : test_team.module.algorithm.AStarPathPlanning
TestSearch.PathPlanning.Police : test_team.module.algorithm.AStarPathPlanning

TestSearch.Clustering.Ambulance : adf.sample.module.algorithm.SampleKMeans
TestSearch.Clustering.Fire : adf.sample.module.algorithm.SampleKMeans
TestSearch.Clustering.Police : adf.sample.module.algorithm.SampleKMeans

TacticsAmbulanceCentre.TargetAllocator : test_team.module.complex.center.TestAmbulanceTargetAllocator
TacticsFireStation.TargetAllocator : test_team.module.complex.center.TestFireTargetAllocator
TacticsPoliceOffice.TargetAllocator : test_team.module.complex.center.TestPoliceTargetAllocator


TacticsAmbulanceTeam.ActionTransport : adf.sample.extaction.ActionTransport
TacticsAmbulanceTeam.ActionExtMove : adf.sample.extaction.ActionExtMove

TacticsAmbulanceTeam.CommandExecutorAmbulance : adf.sample.centralized.CommandExecutorAmbulance
TacticsAmbulanceTeam.CommandExecutorScout : adf.sample.centralized.CommandExecutorScout

TacticsFireBrigade.ActionFireFighting : adf.sample.extaction.ActionFireFighting
TacticsFireBrigade.ActionExtMove : adf.sample.extaction.ActionExtMove

TacticsFireBrigade.CommandExecutorFire : adf.sample.centralized.CommandExecutorFire
TacticsFireBrigade.CommandExecutorScout : adf.sample.centralized.CommandExecutorScout


TacticsPoliceForce.ActionExtClear : adf.sample.extaction.ActionExtClear
TacticsPoliceForce.ActionExtMove : adf.sample.extaction.ActionExtMove

TacticsPoliceForce.CommandExecutorPolice : adf.sample.centralized.CommandExecutorPolice
TacticsPoliceForce.CommandExecutorScout : adf.sample.centralized.CommandExecutorScoutPolice

ActionExtClear.PathPlanning : test_team.module.algorithm.AStarPathPlanning
ActionExtMove.PathPlanning : test_team.module.algorithm.AStarPathPlanning
ActionFireFighting.PathPlanning : test_team.module.algorithm.AStarPathPlanning
ActionTransport.PathPlanning : test_team.module.algorithm.AStarPathPlanning


CommandExecutorAmbulance.PathPlanning : test_team.module.algorithm.AStarPathPlanning

CommandExecutorAmbulance.ActionTransport : adf.sample.extaction.ActionTransport
CommandExecutorAmbulance.ActionExtMove : adf.sample.extaction.ActionExtMove

CommandExecutorFire.PathPlanning : test_team.module.algorithm.AStarPathPlanning

CommandExecutorFire.ActionFireFighting : adf.sample.extaction.ActionFireFighting
CommandExecutorFire.ActionExtMove : adf.sample.extaction.ActionExtMove

CommandExecutorPolice.PathPlanning : test_team.module.algorithm.AStarPathPlanning

CommandExecutorPolice.ActionExtClear : adf.sample.extaction.ActionExtClear
CommandExecutorPolice.ActionExtMove : adf.sample.extaction.ActionExtMove

CommandExecutorScout.PathPlanning : test_team.module.algorithm.AStarPathPlanning

CommandExecutorScoutPolice.PathPlanning : test_team.module.algorithm.AStarPathPlanning
CommandExecutorScoutPolice.ActionExtClear : adf.sample.extaction.ActionExtClear


TacticsAmbulanceCentre.CommandPicker : adf.sample.centralized.CommandPickerAmbulance
TacticsFireStation.CommandPicker : adf.sample.centralized.CommandPickerFire
TacticsPoliceOffice.CommandPicker : adf.sample.centralized.CommandPickerPolice

MessageManager.PlatoonChannelSubscriber : adf.sample.module.comm.SampleChannelSubscriber
MessageManager.CenterChannelSubscriber : adf.sample.module.comm.SampleChannelSubscriber

MessageManager.PlatoonMessageCoordinator : adf.sample.module.comm.SampleMessageCoordinator
MessageManager.CenterMessageCoordinator : adf.sample.module.comm.SampleMessageCoordinator

VisualDebug:true
## DefaultTacticsAmbulanceTeam
DefaultTacticsAmbulanceTeam.HumanDetector : sample_team.module.complex.SampleHumanDetector
DefaultTacticsAmbulanceTeam.Search : sample_team.module.complex.SampleSearch
DefaultTacticsAmbulanceTeam.ExtActionTransport : adf.impl.extaction.DefaultExtActionTransport
DefaultTacticsAmbulanceTeam.ExtActionMove : adf.impl.extaction.DefaultExtActionMove
DefaultTacticsAmbulanceTeam.CommandExecutorAmbulance : adf.impl.centralized.DefaultCommandExecutorAmbulance
DefaultTacticsAmbulanceTeam.CommandExecutorScout : adf.impl.centralized.DefaultCommandExecutorScout

## DefaultTacticsFireBrigade
DefaultTacticsFireBrigade.HumanDetector : sample_team.module.complex.SampleHumanDetector
DefaultTacticsFireBrigade.Search : sample_team.module.complex.self.SampleSearch
DefaultTacticsFireBrigade.ExtActionFireRescue : adf.impl.extaction.DefaultExtActionFireRescue
DefaultTacticsFireBrigade.ActionExtMove : adf.impl.extaction.DefaultActionExtMove
DefaultTacticsFireBrigade.CommandExecutorFire : adf.impl.centralized.DefaultCommandExecutorFire
DefaultTacticsFireBrigade.CommandExecutorScout : adf.impl.centralized.DefaultCommandExecutorScout

## DefaultTacticsPoliceForce
DefaultTacticsPoliceForce.RoadDetector : sample_team.module.complex.SampleRoadDetector
DefaultTacticsPoliceForce.Search : sample_team.module.complex.SampleSearch
DefaultTacticsPoliceForce.ActionExtClear : adf.impl.extaction.DefaultActionExtClear
DefaultTacticsPoliceForce.ActionExtMove : adf.impl.extaction.DefaultActionExtMove
DefaultTacticsPoliceForce.CommandExecutorPolice : adf.impl.centralized.DefaultCommandExecutorPolice
DefaultTacticsPoliceForce.CommandExecutorScout : adf.impl.centralized.DefaultCommandExecutorScoutPolice

## DefaultTacticsAmbulanceCentre
DefaultTacticsAmbulanceCentre.TargetAllocator : sample_team.module.complex.SampleAmbulanceTargetAllocator
DefaultTacticsAmbulanceCentre.CommandPicker : adf.impl.centralized.DefaultCommandPickerAmbulance

## DefaultTacticsFireStation
DefaultTacticsFireStation.TargetAllocator : sample_team.module.complex.SampleFireTargetAllocator
DefaultTacticsFireStation.CommandPicker : adf.impl.centralized.DefaultCommandPickerFire

## DefaultTacticsPoliceOffice
DefaultTacticsPoliceOffice.TargetAllocator : sample_team.module.complex.SamplePoliceTargetAllocator
DefaultTacticsPoliceOffice.CommandPicker : adf.impl.centralized.DefaultCommandPickerPolice

## SampleSearch
SampleSearch.PathPlanning.Ambulance : adf.impl.module.algorithm.DijkstraPathPlanning
SampleSearch.Clustering.Ambulance : adf.impl.module.algorithm.KMeansClustering
SampleSearch.PathPlanning.Fire : adf.impl.module.algorithm.DijkstraPathPlanning
SampleSearch.Clustering.Fire : adf.impl.module.algorithm.KMeansClustering
SampleSearch.PathPlanning.Police : adf.impl.module.algorithm.DijkstraPathPlanning
SampleSearch.Clustering.Police : adf.impl.module.algorithm.KMeansClustering

## SampleBuildDetector
SampleBuildingDetector.Clustering : adf.impl.module.algorithm.KMeansClustering

## SampleRoadDetector
SampleRoadDetector.Clustering : adf.impl.module.algorithm.KMeansClustering
SampleRoadDetector.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning

## SampleHumanDetector
SampleHumanDetector.Clustering : adf.impl.module.algorithm.KMeansClustering

## DefaultExtActionClear
DefaultExtActionClear.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning

## DefaultExtActionFireFighting
DefaultExtActionFireFighting.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning

## DefaultExtActionFireRescue
DefaultExtActionFireRescue.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning

## DefaultExtActionMove
DefaultExtActionMove.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning

## DefaultExtActionTransport
DefaultExtActionTransport.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning

## DefaultCommandExecutorAmbulance
DefaultCommandExecutorAmbulance.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning
DefaultCommandExecutorAmbulance.ExtActionTransport : adf.impl.extaction.DefaultExtActionTransport
DefaultCommandExecutorAmbulance.ExtActionMove : adf.impl.extaction.DefaultExtActionMove

## DefaultCommandExecutorFire
DefaultCommandExecutorFire.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning
DefaultCommandExecutorFire.EtxActionFireRescue : adf.impl.extaction.DefaultExtActionFireRescue
DefaultCommandExecutorFire.EtxActionFireFighting : adf.impl.extaction.DefaultExtActionFireFighting
DefaultCommandExecutorFire.ExtActionMove : adf.impl.extaction.DefaultExtActionMove

## DefaultCommandExecutorPolice
DefaultCommandExecutorPolice.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning
DefaultCommandExecutorPolice.ExtActionClear : adf.impl.extaction.DefaultExtActionClear
DefaultCommandExecutorPolice.ExtActionMove : adf.impl.extaction.DefaultExtActionMove

## DefaultCommandExecutorScout
DefaultCommandExecutorScout.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning

## DefaultCommandExecutorScoutPolice
DefaultCommandExecutorScoutPolice.PathPlanning : adf.impl.module.algorithm.DijkstraPathPlanning
DefaultCommandExecutorScoutPolice.ExtActionClear : adf.impl.extaction.DefaultExtActionClear

## MessageManager
MessageManager.PlatoonChannelSubscriber : adf.impl.module.comm.DefaultChannelSubscriber
MessageManager.CenterChannelSubscriber : adf.impl.module.comm.DefaultChannelSubscriber
MessageManager.PlatoonMessageCoordinator : adf.impl.module.comm.DefaultMessageCoordinator
MessageManager.CenterMessageCoordinator : adf.impl.module.comm.DefaultMessageCoordinator

## VisualDebug
VisualDebug : true
Loading

0 comments on commit 2eb8c76

Please sign in to comment.