16.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 10ae9e85 authored by Stefan Schuhbaeck's avatar Stefan Schuhbaeck
Browse files

Merge branch 'master' into 181_gnm_linkedCellGridAssertion fix #181

parents 640cf23c ed672836
# Changelog: Vadere
**Note:** Before writing into this file, read the guidelines in [Writing Changelog Entries.md](Documentation/contributing/Writing Changelog Entries.md).
# In Progress: v0.7
## In Progress: v0.7
## Added
### Added
- Added script "osm2vadere.py" to "Tools" folder, to convert OpenStreetMap maps to a Vadere topography. (929d4775: Tools).
- `VadereConsole`: Add option `--logname <filename>` to specify the name for the log file.
Please note that the log file `log.out` is always written (because this file is configured
in the `log4j.properties` of each Vadere module (i.e., "gui", "meshing", ...). (c61a3946: Simulator)
......@@ -24,9 +27,9 @@
sub-command. This will will turn the ScenarioChecker on or off for the command
line. If the Checker detects an error the simulation will not be executed.
# v0.6 (2018-09-07)
## v0.6 (2018-09-07)
## Added
### Added
- Graphical simulation result is displayed in a table view to show run-time and overlap information if the corresponding processors are loaded. The Simulation result dialog can be deactivated in the preferences. (5ffca5a3: Simulator, GUI)
- Added new OutputProcessors for Overlaps. (8028c523: Simulator)
......@@ -39,7 +42,7 @@
- Added sub commands to "VadereConsole": project-run, scenario-run, suq, migrate (c7e0538c: GUI)
- In the onlinevisualization it is now possible to display the target potential field of a selected pedestrian. (123457aa: GUI)
## Changed
### Changed
- PedestrianOverlapProcessor returns two values "distance", "overlaps"for each overlap detected. (5ffca5a3: Simulator)
* If no overlap occurs the output is empty.
......@@ -49,21 +52,21 @@
* Move /scenario/attributesModel/org.vadere.state.attributes.models.AttributesCGM/groupSizeDistribution to each source in /scenario/topography/sources/[]/groupSizeDistribution. This allows different group size distribution for each source
* Rename /scenario/attributesModel/*/timeCostAttributes/standardDerivation to standardDeviation.
## Performance
### Performance
- Faster distance computation. (6214738c: Simulator)
* To compute the distance from a point x the closest obstacle we compute the distances on a Cartesian grid of cell size equal to the default value of AttributesFloorField.potentialFieldResolution. There are two methods to compute the distances.
* Brute force (default): Compute the distance for a grid point x by computing all distances (for all obstacles) taking the minimal
* Eikonal Equation solvers (unused): Use obstacles to be the targets are of the eikonal equation and solve the equation using one of the solvers (default is the Fast Marching Method).
# v0.2 (2016-12-22)
## v0.2 (2016-12-22)
## Added
### Added
- Stability and usability improved, additional pedestrian simulation models are supported. (babf0b67: GUI, Simulator, State, Utils)
# v0.1 (2016-08-05)
## v0.1 (2016-08-05)
## Added
### Added
- Initial release of the software as open source. (72391fab: GUI, Simulator, State, Utils)
Contribution guidelines
=======================
# Contributing: Vadere
Workflow
--------
This guide explains the repository structure, how to set up the development environment and introduces coding guidelines.
## Repository Structure
The repository contains following `files` and `folders`:
- The Vadere source code: divided into the sofware modules `VadereGui`, `VadereMeshing`, `VaderSimulator`, `VadereState`, `VadereUtils`
- `VadereModelTests`: pre-shipped tests for different locomotion models (e.g., gradient navigation model, optimal steps model, social force model)
- `Tools`: scripts which are executing during the continuous integration phase.
- `.gitlab`: templates for creating issues in the Vadere [issue tracker](https://gitlab.lrz.de/vadere/vadere/issues) (this files are implicitly used by GitLab).
- `.gitlab-ci.yml`: instructions which are executed during the [continuous integration pipeline](https://docs.gitlab.com/ee/ci/quick_start/).
## Development Setup
1. Follow the **installation instructions** in the [README.md](README.md) to install all required software and to get the source code.
2. Open a shell and `cd` into the project directory.
3. Run `mvn clean install`.
The project can now be imported *As Maven Project* into your IDE.
### Eclipse
1. *File* > *Import* > *Maven* > *Existing Maven Projects*
2. Choose `pom.xml` as *Root Directory* and click *Finish*
3. Open *Vaderegui (gui)* > *src* > *org.vadere.gui.projectview* > `Vadereapplication`
### IntelliJ IDEA
1. On the welcome-screen select *Import Project*
2. Select `pom.xml` > *Next* > *Next* > *Next* > *Finish*
3. Open *VadereGui (gui)* > *src* > *org.vadere.gui.projectview* > `VadereApplication`
4. lick the *run*-icon next to the `main` method
5. Edit the run configuration for `VadereApplication` to build the project using Maven instead of IntelliJ's internal builder to avoid compilation errors:
6. Click *Edit Configurations* (in dropdown menu next to the play/debug button)
7. Under *Before launch*, add *Run Maven Goal* and use the Maven goal `compile`
Alternatively, run `mvn eclipse:eclipse` using the [Maven Eclipse Plugin](http://maven.apache.org/plugins/maven-eclipse-plugin/usage.html) or `mvn idea:idea` using the [Maven IntelliJ Plugin](http://maven.apache.org/plugins/maven-idea-plugin/).
## Workflow
To efficiently contribute to this project, you need an LRZ GitLab account.
Please contact us and we will send you an invitation.
The workflow then is the following.
1. **Fork this Git repository**
2. Clone your own fork to your computer
3. Checkout a new branch and work on your new feature or bugfix
4. Push your branch and **send us a merge request**
### Use the Issue Tracker
Please, use the [issue tracker](https://gitlab.lrz.de/vadere/vadere/issues) for both
- to request a feature or to report a bug (see [how to write new issues](https://gitlab.lrz.de/vadere/vadere/issues/179))
- to work on a feature (see [how to work on an issue](https://gitlab.lrz.de/vadere/vadere/issues/184))
**Tip:** Sort the issues in the [issue tracker](https://gitlab.lrz.de/vadere/vadere/issues) by `Label priority`.
### Steps for External Contributors
The workflow is the following:
1. **Fork this Git repository**
2. Clone your own fork to your computer
3. Checkout a new branch and work on your new feature or bugfix
4. Push your branch and **send us a merge request**
These steps are explained in more detail at the
[GitHub help pages](https://help.github.com/articles/fork-a-repo/).
Merge/pull requests are described [on GitLab](https://about.gitlab.com/2014/09/29/gitlab-flow/#mergepull-requests-with-gitlab-flow).
Coding style guide
------------------
## Style Guides
### For Coding
Basic rules:
- No warnings
- No unused imports
- No unecessary `this.` qualifiers
- Use the formatting tool!
- Eclipse: select text (optional) and press <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>f</kbd>
- IntelliJ: select text (optional) and <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>l</kbd>
- No warnings
- No unused imports
- No unecessary `this.` qualifiers
- Use the formatting tool!
- Eclipse: select text (optional) and press <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>f</kbd>
- IntelliJ: select text (optional) and <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>l</kbd>
For source code formatting, we use an adapted version of
[Google's Coding style guide](https://google.github.io/styleguide/javaguide.html).
Please check the [README in this repository](https://gitlab.lrz.de/vadere/styleguide)
for the style guide and for how to import the style settings into your IDE.
Commit style guide
------------------
### For Commit Messages
These are examples for a good commit messages:
......@@ -52,13 +100,13 @@ used in multiple places.
Rules:
1. Separate subject from body with a blank line
2. Limit the subject line to 50 characters
3. Capitalize the subject line
4. Do not end the subject line with a period
5. Use the imperative mood in the subject line
6. Wrap the body at 72 characters
7. Use the body to explain what and why vs. how
1. Separate subject from body with a blank line
2. Limit the subject line to 50 characters
3. Capitalize the subject line
4. Do not end the subject line with a period
5. Use the imperative mood in the subject line
6. Wrap the body at 72 characters
7. Use the body to explain what and why vs. how
Source: http://chris.beams.io/posts/git-commit/
......@@ -70,10 +118,9 @@ Reasons include:
Rules 1, 3, and 4 never hurt and should always be applied.
Miscellaneous
-------------
### Miscellaneous
### Author tag in JavaDoc
#### Author Tag in JavaDoc
If you make important contributions to a Java class, and especially if you feel
responsible for that class, please add yourself as an author to the class-level
......@@ -90,8 +137,14 @@ public class Foo {
...
```
### Tests required
#### Tests Required
Especially if you implement new functionality, please also provide JUnit tests.
The test classes should be located in the `tests/` folder but in the same
package as the class under test.
## Contributors
People who have contributed code to the project at the Munich University of Applied Sciences (in alphabetical order):
Florian Albrecht, Benjamin Degenhart, Felix Dietrich, Marion Gödel, Benedikt Kleinmeier, Daniel Lehmberg, Jakob Schöttl, Stefan Schuhbäck, Michael Seitz, Swen Stemmer, Isabella von Sivers, Mario Teixeira Parente, Peter Zarnitz, Benedikt Zönnchen
ExampleProject
\ No newline at end of file
......@@ -11,11 +11,11 @@ The first example doest not provide any context where the change was made or wha
## Writing into Changelog.md
1. Each new version number gets an own section prefixed with `#` and a date, e.g., `# v0.1 (2018-01-31)`.
1. Each new version number gets an own subsection prefixed with `##` and a date, e.g., `## v0.1 (2018-01-31)`.
Notes:
* Unreleased versions should be marked explicitly, e.g., `# 0.1 (unreleased)`.
* Unreleased versions should be marked explicitly, e.g., `## 0.1 (unreleased)`.
* New versions should be added on top (and not at bottom).
2. Each change type gets an own subsection prefixed with `##`, e.g., `Added`.
2. Each change type gets an own subsubsection prefixed with `###`, e.g., `Added`.
3. Each changelog entry should contain following parts:
1. An own bullet point.
2. The description of the change.
......@@ -26,9 +26,9 @@ The first example doest not provide any context where the change was made or wha
For instance:
```
# v0.1 (2018-01-31)
## v0.1 (2018-01-31)
## Removed
### Removed
- Removed obsolete model attribute "foo" from class "bar". (e8af1b77: State).
* ...
......
......@@ -4,16 +4,16 @@
# VADERE
VADERE is an open source framework for the simulation of microscopic pedestrian dynamics. In addition to this core domain, other systems including cars and granular flow can be introduced into the framework. VADERE provides generic model classes and visualisation and data analysis tools for two-dimensional systems. A series of simulation models are already implemented in the framework that are also the basis for scientific publications. Namely the optimal steps model, the gradient navigation model, and the social force model are available for simulation studies.
VADERE is an open source framework for the simulation of microscopic pedestrian dynamics. VADERE provides generic model classes and visualisation and data analysis tools for two-dimensional systems. A series of pedestrian locomotion models are already implemented in the framework that are also the basis for scientific publications. Namely the optimal steps model, the gradient navigation model, and the social force model are available for simulation studies. In addition to pedestrians, other systems including cars and granular flow can be introduced into the framework.
This software runs on OS X, Windows, and Linux.
This software runs on Windows, OS X and Linux.
VADERE has been developed by [Prof. Dr. Gerta Köster's](http://www.cs.hm.edu/die_fakultaet/ansprechpartner/professoren/koester/index.de.html)
research group at the [Munich University of Applied Sciences](https://www.hm.edu/) at the
[department for Computer Science and Mathematics](http://cs.hm.edu/).
However, we welcome contributions from external sources.
The VADERE framework includes a mesh generator for unstructured high quality 2D meshes called **EikMesh** which is described [here](https://gitlab.lrz.de/vadere/vadere/blob/master/VadereMeshing/README.md).
The VADERE framework includes a mesh generator for unstructured high-quality 2D meshes called **EikMesh** which is described [here](https://gitlab.lrz.de/vadere/vadere/blob/master/VadereMeshing/README.md).
## Pipeline Status
......@@ -33,12 +33,12 @@ The VADERE framework includes a mesh generator for unstructured high quality 2D
### Install OpenCL
For this project, GPGPU with OpenCL is used to speed up some computations. Therefore, the following requirements have to be met:
VADERE uses computer's video card to speed up some computations. Therefore, following OpenCL components must be installed:
* the latest drivers for your OpenCL device(s)
* an OpenCL SDK
#### Operating Systems
Please, use following instructions to set up the OpenCL components for your operating system:
* Windows: For further information using OpenCL on Windows [click here](https://streamcomputing.eu/blog/2015-03-16/how-to-install-opencl-on-windows/).
* OS X: OpenCL is pre-installed for OS X.
......@@ -46,46 +46,23 @@ For this project, GPGPU with OpenCL is used to speed up some computations. There
* [Sources: OpenCL HowTo](https://wiki.tiker.net/OpenCLHowTo)
* [Intel Driverpack (only driver needed)](https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver)
### Run the Application
## Run the Application
1. Get the Source: Run `git clone https://gitlab.lrz.de/vadere/vadere.git`.
2. Build the Application: Go to the project directory and run `mvn clean package` (or `mvn clean package -Dmaven.test.skip` if you want to skip the unit tests). This will build `vadere.jar`and `postvis.jar`.
3. Start the Application: After building the application, you can start Vadere by running `java -jar VadereGui/target/vadere.jar`.
4. (If you only want to use the Postvisualization-Tool you can do so by running `java -jar VadereGui/target/postvis.jar`).
## Usage Example
### Run Built-In Examples
With the following steps, you can start a scenario of one of the model test projects in [VadereModelTests](VadereModelTests):
With the following steps, you can run a simulation with one of the built-in examples from [VadereModelTests](VadereModelTests):
- start Vadere
- *Project* > *Open*
- choose `vadere.project` of one of the projects e.g. [TestOSM](VadereModelTests/TestOSM) and click *open*
- select the scenario on the left and press *run selected scenario*
## Development Setup
Follow the **installation instructions** above i.e. install all required software and get the source. Go to the project directory and run `mvn clean install`. The project can now be imported *As Maven Project* in your IDE.
### Eclipse
- *File* > *Import* > *Maven* > *Existing Maven Projects*
- choose `pom.xml` as *Root Directory* and click *Finish*
- open *Vaderegui (gui)* > *src* > *org.vadere.gui.projectview* > `Vadereapplication`
### IntelliJ IDEA
- on the welcome-screen select *Import Project*
- select `pom.xml` > *Next* > *Next* > *Next* > *Finish*
- open *VadereGui (gui)* > *src* > *org.vadere.gui.projectview* > `VadereApplication`
- click the *run*-icon next to the `main` method
- edit the run configuration for `VadereApplication` to build the project using Maven instead of IntelliJ's internal builder to avoid compilation errors:
* click *Edit Configurations* (in dropdown menu next to the play/debug button)
* under *Before launch*, add *Run Maven Goal* and use the Maven goal `compile`
Alternatively, run `mvn eclipse:eclipse` using the [Maven Eclipse Plugin](http://maven.apache.org/plugins/maven-eclipse-plugin/usage.html) or `mvn idea:idea` using the [Maven IntelliJ Plugin](http://maven.apache.org/plugins/maven-idea-plugin/).
### Git Hooks
### Use Git Hooks
Since it is important to reproduce simulation results, we have the guidline that each output file has to provide its commit-hash. This commit-hash identifies
the state the software was in when the output file was generated. Therefore, git hooks save the commit-hash in the **current_commit_hash.txt** which
......@@ -102,20 +79,14 @@ These files start the script [git-hook-vadere-software](Documentation/version-co
To create the **current_commit_hash.txt** without changes to the current commit, you can choose *Switch/Checkout...* on the Repository folder or you
switch to another branch and switch back again using the command line or any other tool you prefer.
## Contribution
Please see [Contribution guidelines](CONTRIBUTING.md). The document defines guidelines for coding style and commit messages.
## Contributors
People who have contributed code to the project at the Munich University of Applied Sciences (in alphabetical order):
Florian Albrecht, Benjamin Degenhart, Felix Dietrich, Marion Gödel, Benedikt Kleinmeier, Daniel Lehmberg, Jakob Schöttl, Stefan Schuhbäck, Michael Seitz, Swen Stemmer, Isabella von Sivers, Mario Teixeira Parente, Peter Zarnitz, Benedikt Zönnchen
## Changelog
See [CHANGELOG.md](CHANGELOG.md) for a list of changes.
## Contribution
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to set up the development environment and the coding guidelines.
## License
This software is licensed under the GNU Lesser General Public License ([LGPL](LICENSE)).
......
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
# Convert OpenStreetMap XML file exported from https://www.openstreetmap.org/
# to a Vadere topology (in Cartesian coordinates).
#
# Steps to run this script:
#
# 1. Go to https://www.openstreetmap.org/.
# 2. Click "Export" and adjust region of intereset and zoom level.
# 3. Call script and pass exported file from (2):
#
# python3 <script> <exported_file>
#
# 4. Insert output into "topography" tab of Vadere.
#
# Note: currently, the scripts converts only buildings to Vadere obstacles.
#
# Watch out: before running this script, install its dependencies using pip:
#
# pip install -r requirements.txt
#
# An OpenStreetMap XML file has following structure:
#
# 1. The boundary box of the exported tile.
# 2. List of all nodes in the tile containing latitude and longitude.
# 3. Paths are formed using references to (2).
#
# Example OSM file:
#
# <?xml version="1.0" encoding="UTF-8"?>
# <osm version="0.6" ...>
# <bounds minlat="47.8480100" minlon="11.8207100" maxlat="47.8495600" maxlon="11.8249200"/>
# <node id="31413334" ... lat="47.8563764" lon="11.8186396"/>
# ...
# <way id="192686406" ...>
# <nd ref="31413334"/>
# <nd ref="3578052113"/>
# <nd ref="394769402"/>
# <nd ref="3828186058"/>
# <tag k="highway" v="unclassified"/>
# </way>
# ...
#
# A Vadere obstacle looks like this:
#
# {
# "shape" : {
# "type" : "POLYGON",
# "points" : [ { "x" : 43.7, "y" : 3.4 }, ... ]
# },
# "id" : -1
# }
from lxml import etree
from string import Template
import argparse
import utm
import math
def parse_command_line_arguments():
parser = argparse.ArgumentParser(description="Convert and OpenStreetMap file to a Vadere topology description.")
parser.add_argument("filename", type=str, nargs="?",
help="An OSM map in XML format.",
default="maps/map_hochschule_klein.osm",
)
parser.add_argument("-o", "--output", type=str, nargs="?",
help="Specify filename if you want the output in a file.")
args = parser.parse_args()
return args
def extract_latitude_and_longitude_for_each_xml_node(xml_tree):
# Select all nodes (not only buildings).
nodes = xml_tree.xpath("/osm/node")
nodes_dictionary_with_lat_and_lon = {node.get("id"): (node.get("lat"), node.get("lon")) for node in nodes}
return nodes_dictionary_with_lat_and_lon
def filter_for_buildings(xml_tree):
# Select "way" nodes with a child node "tag" annotated with attribute "k='building'".
buildings = xml_tree.xpath("/osm/way[./tag/@k='building']")
return buildings
def filter_for_buildings_in_relations(xml_tree):
# Note: A relation describes a shape with "cutting holes".
# Select "relation" nodes with a child node "tag" annotated with attribute "k='building'".
buildings = xml_tree.xpath("/osm/relation[./tag/@k='building']")
# We only want the shapes and only the outer parts. role='inner' is for "cutting holes" in the shape.
members_in_the_relations = [building.xpath("./member[./@type='way' and ./@role='outer']") for building in buildings]
way_ids = []
for element in members_in_the_relations:
for way in element:
way_ids.append(way.get("ref"))
ways = xml_tree.xpath("/osm/way")
ways_as_dict_with_id_key = {way.get("id"): way for way in ways}
buildings_from_relations = [ways_as_dict_with_id_key[id] for id in way_ids]
return buildings_from_relations
def extract_base_point(xml_tree):
base_node = xml_tree.xpath("/osm/bounds")[0]
base_point = (base_node.get("minlat"), base_node.get("minlon"))
return base_point
def extract_end_point(xml_tree):
end_node = xml_tree.xpath("/osm/bounds")[0]
end_point = (end_node.get("maxlat"), end_node.get("maxlon"))
return end_point
def assert_that_start_and_end_point_are_equal(node_references):
assert node_references[0].get("ref") == node_references[-1].get("ref")
def convert_nodes_to_cartesian_points(nodes, lookup_table_latitude_and_longitude, base_point):
cartesian_points = []
# Use base point to normalize coordinates to (0,0).
(baseX, baseY, base_zone_number, base_zone_letter) = utm.from_latlon(float(base_point[0]), float(base_point[1]))
# Omit last node because it should be the same as the first one.
for node in nodes[:len(nodes) - 1]:
reference = node.get("ref")
latitude, longitude = lookup_table_latitude_and_longitude[reference]
(x, y, zone_number, zone_letter) = utm.from_latlon(float(latitude), float(longitude))
# TODO: handle coordinates from different segments properly.
assert base_zone_number == zone_number, "Overstepped UTM boundary(zone number)"
assert base_zone_letter == zone_letter, "Overstepped UTM boundary(zone letter)"
point_to_add = (x-baseX, y - baseY)
cartesian_points.append(point_to_add)
return cartesian_points
def create_vadere_obstacles_from_points(cartesian_points):
vadere_obstacle_string = """{
"shape" : {
"type" : "POLYGON",
"points" : [ $points ]
},
"id" : -1
}"""
vadere_point_string = '{ "x" : $x, "y" : $y }'
obstacle_string_template = Template(vadere_obstacle_string)
point_string_template = Template(vadere_point_string)
points_as_string = [point_string_template.substitute(x=x, y=y) for x, y in cartesian_points]
points_as_string_concatenated = ", ".join(points_as_string)
vadere_obstacle_as_string = obstacle_string_template.substitute(points=points_as_string_concatenated)
return vadere_obstacle_as_string
def build_vadere_topography_input_with_obstacles(obstacles, base_point, end_point):
with open("vadere_topography_default.txt", "r") as myfile:
vadere_topography_input = myfile.read().replace('\n', '')
base_point_cartesian = utm.from_latlon(float(base_point[0]), float(base_point[1]))
end_point_cartesian = utm.from_latlon(float(end_point[0]), float(end_point[1]))
width = math.ceil(end_point_cartesian[0] - base_point_cartesian[0])
height = math.ceil(end_point_cartesian[1] - base_point_cartesian[1])
vadere_topography_output = Template(vadere_topography_input).substitute(width=width, height=height, obstacles=obstacles)
return vadere_topography_output
def print_xml_parsing_statistics(filename, nodes_dictionary, simple_buildings, complex_buildings, base_point):
print("File: {}".format(filename))
print(" Nodes: {}".format(len(nodes_dictionary)))
print(" Simple buildings: {}".format(len(simple_buildings)))
print(" Complex buildings: {}".format(len(complex_buildings)))
print(" Base point: {}".format(base_point))
def print_output(outputfile, output):
if outputfile == None:
print(output)
else:
with open(outputfile, "w") as text_file:
print(output, file=text_file)
if __name__ == "__main__":
args = parse_command_line_arguments()
xml_tree = etree.parse(args.filename)
nodes_dictionary_with_lat_and_lon = extract_latitude_and_longitude_for_each_xml_node(xml_tree)
simple_buildings = filter_for_buildings(xml_tree)
complex_buildings = filter_for_buildings_in_relations(xml_tree)
base_point = extract_base_point(xml_tree)
end_point = extract_end_point(xml_tree)
print_xml_parsing_statistics(args.filename, nodes_dictionary_with_lat_and_lon, simple_buildings, complex_buildings, base_point)
list_of_vadere_obstacles_as_strings = []
for building in simple_buildings + complex_buildings:
# Collect nodes that belong to the current building.
node_references = building.xpath("./nd")
assert_that_start_and_end_point_are_equal(node_references)
cartesian_points = convert_nodes_to_cartesian_points(node_references, nodes_dictionary_with_lat_and_lon, base_point)
vadere_obstacles_as_strings = create_vadere_obstacles_from_points(cartesian_points)
list_of_vadere_obstacles_as_strings.append(vadere_obstacles_as_strings)
obstacles_joined = ",\n".join(list_of_vadere_obstacles_as_strings)
vadere_topography_output = build_vadere_topography_input_with_obstacles(obstacles_joined, base_point, end_point)
print_output(args.output, vadere_topography_output)
{
"attributes" : {
"bounds" : {
"x" : 0.0,
"y" : 0.0,
"width" : $width,
"height" : $height
},
"boundingBoxWidth" : 0.5,
"bounded" : true
},
"obstacles" : [ $obstacles],
"stairs" : [ ],
"targets" : [ ],
"sources" : [ ],
"dynamicElements" : [ ],
"attributesPedestrian" : {
"radius" : 0.195,
"densityDependentSpeed" : false,
"speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5,
"maximumSpeed" : 2.2,
"acceleration" : 2.0
},
"attributesCar" : {
"id" : -1,