fist config json file
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
CONFIG_DIR = Path(__file__).parent
|
||||
|
||||
def load_config(config_name: str):
|
||||
config_path = CONFIG_DIR / f"{config_name}.json"
|
||||
with open(config_path, 'r') as f:
|
||||
return json.load(f)
|
||||
|
||||
def save_config(config: dict, config_name: str):
|
||||
config_path = CONFIG_DIR / f"{config_name}.json"
|
||||
with open(config_path, 'w') as f:
|
||||
json.dump(config, f, indent=4)
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "prototype",
|
||||
"version": "1.0",
|
||||
"camera": {
|
||||
"resolution_raw": [1920, 1080],
|
||||
"fps": 60,
|
||||
"units": 15,
|
||||
"resolution_stitch": [400, 400]
|
||||
},
|
||||
"elastomer": {
|
||||
"thickness_mm": 3.0,
|
||||
"marker_pattern": "random_color",
|
||||
"marker_version": "1.0"
|
||||
},
|
||||
"mechanical":{
|
||||
"width_mm": 10,
|
||||
"height_mm": 10,
|
||||
"depth_mm": 10
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user