Mobius uses a json format to represent trajectories.
This script converts txt trajectories from this data archive in the appropriate json file.
The json structure includes three main blocks:
- Entities: A list of entities, each with attributes like ID, name, max speed, and map plane information.
- Simulation: A time-series list where each entry corresponds to a simulation time, containing samples of entity positions, modes, rotations, and speeds.
- Metadata: A block providing overall simulation information, such as duration, distance maps, timestamps, and additional parameters.
-
Create a virtual environment and install the requirements:
(recommended)
python3 -m venv .venv source .venv/bin/activate
pip install -r requirements.txt
-
Run script
python txt_to_json.py --help