robopark 2.8.28 → 2.8.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "name": "robopark",
3
- "version": "2.8.28",
4
- "description": "RoboPark fleet control CLI — set up, watch, and drive a fleet of talking robots. The operator front-end over the infinicode mesh.",
5
- "type": "module",
6
- "bin": {
7
- "robopark": "./bin/robopark.js"
8
- },
9
- "files": [
10
- "bin/robopark.js",
11
- "scheduler",
12
- "pi-client",
13
- "vision",
14
- "README.md"
15
- ],
16
- "engines": {
17
- "node": ">=20"
18
- },
19
- "dependencies": {
20
- "infinicode": "^2.8.9"
21
- },
22
- "keywords": [
23
- "robopark",
24
- "fleet",
25
- "robots",
26
- "livekit",
27
- "raspberry-pi",
28
- "cli",
29
- "infinicode",
30
- "mesh"
31
- ],
32
- "author": "Ra Kai'Un",
33
- "license": "MIT",
34
- "repository": {
35
- "type": "git",
36
- "url": "https://github.com/MrYungCEO/infinicode"
37
- }
38
- }
1
+ {
2
+ "name": "robopark",
3
+ "version": "2.8.30",
4
+ "description": "RoboPark fleet control CLI — set up, watch, and drive a fleet of talking robots. The operator front-end over the infinicode mesh.",
5
+ "type": "module",
6
+ "bin": {
7
+ "robopark": "./bin/robopark.js"
8
+ },
9
+ "files": [
10
+ "bin/robopark.js",
11
+ "scheduler",
12
+ "pi-client",
13
+ "vision",
14
+ "README.md"
15
+ ],
16
+ "engines": {
17
+ "node": ">=20"
18
+ },
19
+ "dependencies": {
20
+ "infinicode": "^2.8.9"
21
+ },
22
+ "keywords": [
23
+ "robopark",
24
+ "fleet",
25
+ "robots",
26
+ "livekit",
27
+ "raspberry-pi",
28
+ "cli",
29
+ "infinicode",
30
+ "mesh"
31
+ ],
32
+ "author": "Ra Kai'Un",
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/MrYungCEO/infinicode"
37
+ }
38
+ }
package/scheduler/main.py CHANGED
@@ -217,18 +217,18 @@ async def _seed_voice_stacks_and_characters(db):
217
217
  )
218
218
 
219
219
  presets = [
220
- ("volt", "VOLT", "A fast, electric-blue sports robot. Loves speed and racing.", "english-default", _json.dumps(["drive", "boost"])),
221
- ("tesla", "TESLA", "A clever inventor robot with lightning motifs. Curious and talkative.", "english-default", _json.dumps(["drive", "light"])),
222
- ("jaguar", "JAGUAR", "A sleek, powerful predator robot. Confident and agile.", "english-default", _json.dumps(["drive", "pounce"])),
223
- ("vixen", "VIXEN (BMW)", "A cunning, stylish urban robot. Witty and resourceful.", "english-default", _json.dumps(["drive", "navigate"])),
224
- ("panda", "PANDA", "A friendly, cuddly panda robot. Gentle and helpful.", "english-default", _json.dumps(["drive", "wave"])),
220
+ ("volt", "VOLT", "A fast, electric-blue sports robot. Loves speed and racing.", "english-default", _json.dumps(["drive", "boost"]), 0.18, 0.26, "/static/robopark/volt.png"),
221
+ ("tesla", "TESLA", "A clever inventor robot with lightning motifs. Curious and talkative.", "english-default", _json.dumps(["drive", "light"]), 0.38, 0.30, "/static/robopark/tesla.png"),
222
+ ("jaguar", "JAGUAR", "A sleek, powerful predator robot. Confident and agile.", "english-default", _json.dumps(["drive", "pounce"]), 0.58, 0.34, "/static/robopark/jaguar.png"),
223
+ ("vixen", "VIXEN (BMW)", "A cunning, stylish urban robot. Witty and resourceful.", "english-default", _json.dumps(["drive", "navigate"]), 0.54, 0.66, "/static/robopark/bmw.png"),
224
+ ("panda", "PANDA", "A friendly, cuddly panda robot. Gentle and helpful.", "english-default", _json.dumps(["drive", "wave"]), 0.82, 0.52, "/static/robopark/panda.png"),
225
225
  ]
226
226
  for preset in presets:
227
227
  await db.execute(
228
228
  """INSERT OR IGNORE INTO character_presets
229
- (id, name, description, system_prompt, voice_stack_id, motors)
230
- VALUES (?, ?, ?, ?, ?, ?)""",
231
- (preset[0], preset[1], preset[2], None, preset[3], preset[4]),
229
+ (id, name, description, system_prompt, voice_stack_id, motors, nx, ny, img)
230
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)""",
231
+ (preset[0], preset[1], preset[2], None, preset[3], preset[4], preset[5], preset[6], preset[7]),
232
232
  )
233
233
  await db.commit()
234
234
 
@@ -362,6 +362,9 @@ async def init_db():
362
362
  system_prompt TEXT,
363
363
  voice_stack_id TEXT,
364
364
  motors TEXT, -- JSON array
365
+ nx REAL DEFAULT 0.5,
366
+ ny REAL DEFAULT 0.5,
367
+ img TEXT,
365
368
  created_at TEXT DEFAULT CURRENT_TIMESTAMP,
366
369
  updated_at TEXT DEFAULT CURRENT_TIMESTAMP,
367
370
  FOREIGN KEY (voice_stack_id) REFERENCES voice_stacks(id)
@@ -409,6 +412,18 @@ async def init_db():
409
412
  pass # column already present
410
413
  await db.commit()
411
414
 
415
+ # ---- character_presets park-map coordinate / avatar migrations ----
416
+ for _table, _column, _coldef in (
417
+ ("character_presets", "nx", "REAL DEFAULT 0.5"),
418
+ ("character_presets", "ny", "REAL DEFAULT 0.5"),
419
+ ("character_presets", "img", "TEXT"),
420
+ ):
421
+ try:
422
+ await db.execute(f"ALTER TABLE {_table} ADD COLUMN {_column} {_coldef}")
423
+ except Exception:
424
+ pass
425
+ await db.commit()
426
+
412
427
  # No demo robots are seeded. Actual robots enroll via the device
413
428
  # enrollment API or are added through the scheduler UI. This keeps the
414
429
  # fleet view honest — only real connected hardware appears.
@@ -2232,6 +2247,9 @@ class CharacterPreset(BaseModel):
2232
2247
  system_prompt: Optional[str] = None
2233
2248
  voice_stack_id: Optional[str] = None
2234
2249
  motors: List[str] = []
2250
+ nx: float = 0.5
2251
+ ny: float = 0.5
2252
+ img: Optional[str] = None
2235
2253
  created_at: Optional[datetime] = None
2236
2254
  updated_at: Optional[datetime] = None
2237
2255
 
@@ -2242,6 +2260,9 @@ class CharacterPresetCreate(BaseModel):
2242
2260
  system_prompt: Optional[str] = None
2243
2261
  voice_stack_id: Optional[str] = None
2244
2262
  motors: List[str] = []
2263
+ nx: Optional[float] = None
2264
+ ny: Optional[float] = None
2265
+ img: Optional[str] = None
2245
2266
 
2246
2267
  class VoiceStack(BaseModel):
2247
2268
  id: str
@@ -2548,6 +2569,9 @@ async def list_character_presets():
2548
2569
  system_prompt=r["system_prompt"],
2549
2570
  voice_stack_id=r["voice_stack_id"],
2550
2571
  motors=_json.loads(r["motors"]) if r["motors"] else [],
2572
+ nx=float(r["nx"]) if r["nx"] is not None else 0.5,
2573
+ ny=float(r["ny"]) if r["ny"] is not None else 0.5,
2574
+ img=r["img"],
2551
2575
  created_at=r["created_at"],
2552
2576
  updated_at=r["updated_at"],
2553
2577
  )
@@ -2562,11 +2586,14 @@ async def create_character_preset(payload: CharacterPresetCreate):
2562
2586
  async with aiosqlite.connect(DB_PATH) as db:
2563
2587
  await db.execute(
2564
2588
  """INSERT INTO character_presets
2565
- (id, name, description, system_prompt, voice_stack_id, motors, created_at, updated_at)
2566
- VALUES (?, ?, ?, ?, ?, ?, ?, ?)""",
2589
+ (id, name, description, system_prompt, voice_stack_id, motors, nx, ny, img, created_at, updated_at)
2590
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
2567
2591
  (
2568
2592
  preset_id, payload.name, payload.description, payload.system_prompt,
2569
- payload.voice_stack_id, _json.dumps(payload.motors or []), now, now,
2593
+ payload.voice_stack_id, _json.dumps(payload.motors or []),
2594
+ payload.nx if payload.nx is not None else 0.5,
2595
+ payload.ny if payload.ny is not None else 0.5,
2596
+ payload.img, now, now,
2570
2597
  ),
2571
2598
  )
2572
2599
  await db.commit()
@@ -2587,6 +2614,9 @@ async def _get_character_preset(preset_id: str) -> CharacterPreset:
2587
2614
  system_prompt=row["system_prompt"],
2588
2615
  voice_stack_id=row["voice_stack_id"],
2589
2616
  motors=_json.loads(row["motors"]) if row["motors"] else [],
2617
+ nx=float(row["nx"]) if row["nx"] is not None else 0.5,
2618
+ ny=float(row["ny"]) if row["ny"] is not None else 0.5,
2619
+ img=row["img"],
2590
2620
  created_at=row["created_at"],
2591
2621
  updated_at=row["updated_at"],
2592
2622
  )
@@ -2606,11 +2636,15 @@ async def update_character_preset(preset_id: str, payload: CharacterPresetCreate
2606
2636
  raise HTTPException(404, "Character preset not found")
2607
2637
  await db.execute(
2608
2638
  """UPDATE character_presets SET
2609
- name = ?, description = ?, system_prompt = ?, voice_stack_id = ?, motors = ?, updated_at = ?
2639
+ name = ?, description = ?, system_prompt = ?, voice_stack_id = ?, motors = ?,
2640
+ nx = ?, ny = ?, img = ?, updated_at = ?
2610
2641
  WHERE id = ?""",
2611
2642
  (
2612
2643
  payload.name, payload.description, payload.system_prompt,
2613
- payload.voice_stack_id, _json.dumps(payload.motors or []), now, preset_id,
2644
+ payload.voice_stack_id, _json.dumps(payload.motors or []),
2645
+ payload.nx if payload.nx is not None else 0.5,
2646
+ payload.ny if payload.ny is not None else 0.5,
2647
+ payload.img, now, preset_id,
2614
2648
  ),
2615
2649
  )
2616
2650
  await db.commit()