mongodb_server
Structure
The helloric database is MongoDB database containing collections maps and tours.
Maps
Each document in this collection represents an individual map (primary key is name) with the following structure:
erDiagram
MAP {
string description
string name
int[3] origin
float resolution
}
WALL {
string name
string type
}
AREA {
string name
string type
string area_type
int[3] color
}
MARKER {
string name
float radius
int[3] color
}
DATA {
float[3] size
}
POSE {
float[3] position
float[4] orientation
}
MAP ||--o{ WALL : contains_list_of
MAP ||--o{ AREA : contains_list_of
MAP ||--o{ MARKER : contains_list_of
WALL ||--|| DATA : has
AREA ||--|| DATA : has
DATA ||--|| POSE : has
MARKER ||--|| POSE : has
Tours
Each document in this collection represents an individual tour (primary key is tour_name)
with the following structure:
erDiagram
TOUR {
string tour_name
string map_name
}
STEP {
uint16 index
string desctribtion
string destination
string dialogue
}
TOUR ||--o{ STEP : contains_list_of
Start and test
To start the MongoDB server, simply open this repository in a Docker container (e.g., using VS Code).
Then go into the mongodb_server directory:
In test.py, you’ll find two helper methods:
- One to view the current documents in the database.
- Another to clear (drop) the database.
To use them:
-
Open the
main()function intest.py. -
Uncomment the method you want to run.
-
Execute the script inside the Docker container:
Load maps inside the database
You can load maps using mongodb server as package and running 'mapdesc_persistence' node.
But also you can use the load_maps.py script in this repository to load maps into the database from yaml files:
-
Store you yaml files in the
mapsfolder -
In file
load_maps.pychange name of the yaml file (code line 117) -
Run the script inside the container: