README.adoc 3.18 KB
Newer Older
Juon Kawakami's avatar
init  
Juon Kawakami committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
= Robocup Rescue Simulation Server
:author: RoboCup Rescue Team
:nofooter:

(Linux) Instructions to download, build and run the RoboCup Rescue Simulator (RCRS)

== Software Pre-Requisites

* Git
* OpenJDK Java 17
* Gradle

== Installation

=== Download project from GitHub

```bash

$ git clone git@github.com:roborescue/rcrs-server.git
```

=== Compile the project

```bash

$ cd rcrs-server

$ ./gradlew completeBuild
```

=== Execute the Rescue Simulation Server

Open a terminal window, navigate to the ```rcrs-server``` root directory and execute

```bash

$ cd scripts

$ ./start.sh -m ../maps/test/map -c ../maps/test/config
```

== Tools

=== Map Editor

Open a terminal window, navigate to the ```rcrs-server``` root directory and execute

```bash

$ ./gradlew gmlEditor --args='<map file path>'
```
where ```--args=<map file path>``` is optional.

==== Example
```
./gradlew gmlEditor --args='maps/test/map/map.gml'
```

=== Scenario Editor

Open a terminal window, navigate to the ```rcrs-server``` root directory and execute

```bash

$ ./gradlew scenarioEditor --args='<scenario path>'
```
where ```--args=<scenario path>``` is optional.

==== Example
```
./gradlew scenarioEditor --args='maps/test/map'
```

=== Random Scenario

Open a terminal window, navigate to the ```rcrs-server``` root directory and execute

```bash

$ ./gradlew randomScenario --args="'<map path>' <options>"
```
where ```<map path>``` is the path to the map directory and ```<options>``` are the minimum and maximum value for each entity in the scenario. The ```<options>``` are optional.

==== Example
```
./gradlew randomScenario --args="'../maps/test/map' -civ 0 100 -fb 0 10 -fs 0 1 -pf 0 10 -po 0 1 -at 0 5 -ac 0 0 -refuge 0 2 -fire 0 0"
```

=== Log Viewer

Open a terminal window, navigate to the ```rcrs-server``` root directory and execute

```bash

$ ./gradlew logViewer --args="'-c' '<config file>' '<log path>'"
```
where ```<config file>``` is the path to the log viewer configuration file, default ```config/logviewer.cfg```. The ```<log path>``` is the rescue log file path, default ```logs/log/rescue.log```.

==== Example
```
./gradlew logViewer --args="'-c' 'config/logviewer.cfg' 'logs/log/rescue.log'"
```

=== `osm2gml`

Open a terminal window, navigate to the ```rcrs-server``` root directory and execute

```bash

$ ./gradlew osm2gml --args="'<osm map path>' '<gml map path>'"
```
The ```<osm map path>``` is the path to the OSM map file and the ```<gml map path>``` is the destination GML map path.

==== Example
```
./gradlew osm2gml --args="'/home/user/newmap.osm' '/home/user/newmap.gml'"
```

== Known Problems

=== Slow agent connection
If the scenario have many agents, the agents connection to the server may slow down at certain moment. To overcome this issue, you should

1. Install the `rng-tools` package
2. Edit the ` /etc/defaults/rng-tools` and add the line
`HRNGDEVICE=/dev/urandom`
3. Start the rng daemon
`/etc/init.d/rng-tools start`

[IMPORTANT]
This instructions are valid for Ubuntu. The package name and initialization commands may change on other distributions.

== Support

To report a bug, suggest improvements or request support, please open an issue at GitHub <https://github.com/roborescue/rcrs-server/issues>.