Sanadv3/data/motions/instruction.json

73 lines
3.7 KiB
JSON

{
"_comment": "N2 Phase 3 — phrase->canonical movement map for Gemini voice control. The dispatcher (voice/movement_dispatch.py) matches these against GEMINI'S OWN spoken (BOT) transcript (the Marcus phrase-confirmation pattern), NOT the user text. Gemini is instructed (system prompt) to speak ONE short canonical confirmation phrase per requested motion, in EN or AR. Bot_phrases are matched as case-insensitive substrings (English) / exact substrings (Arabic). Parametric regexes keep the number.",
"command_cooldown_sec": 1.5,
"max_steps": 8,
"max_degrees": 360,
"degrees_per_step": 15,
"actions": {
"move_forward": {
"canonical": "move forward",
"bot_phrases": {
"english": ["moving forward", "walking forward", "stepping forward", "stepping closer", "coming closer", "moving ahead"],
"arabic": ["أمشي للأمام", "أتحرك للأمام", "أتقدم للأمام", "أتقدم خطوة", "أتقدّم خطوة"]
}
},
"move_backward": {
"canonical": "move backward",
"bot_phrases": {
"english": ["moving back", "moving backward", "walking back", "stepping back", "backing up"],
"arabic": ["أمشي للخلف", "أتحرك للخلف", "أرجع للخلف", "أتراجع"]
}
},
"turn_right": {
"canonical": "turn right",
"bot_phrases": {
"english": ["turning right", "rotating right", "spinning right"],
"arabic": ["أستدير يميناً", "أستدير يمينا", "أستدير لليمين", "أدور يمين"]
}
},
"turn_left": {
"canonical": "turn left",
"bot_phrases": {
"english": ["turning left", "rotating left", "spinning left"],
"arabic": ["أستدير يساراً", "أستدير يسارا", "أستدير لليسار", "أدور يسار"]
}
},
"slide_left": {
"canonical": "slide left",
"bot_phrases": {
"english": ["sliding left", "strafing left", "stepping left"],
"arabic": ["أنزلق لليسار", "أتحرك جانباً لليسار"]
}
},
"slide_right": {
"canonical": "slide right",
"bot_phrases": {
"english": ["sliding right", "strafing right", "stepping right"],
"arabic": ["أنزلق لليمين", "أتحرك جانباً لليمين"]
}
},
"stop": {
"canonical": "stop",
"bot_phrases": {
"english": ["stopping", "i'll stop", "i will stop", "halting", "holding still"],
"arabic": ["أتوقف", "سأتوقف", "توقفت", "أتوقّف"]
}
}
},
"parametric_actions": [
{ "regex": "walking forward (\\d+) steps?", "canonical": "walk forward $1 steps" },
{ "regex": "walking back(?:ward)? (\\d+) steps?", "canonical": "walk backward $1 steps" },
{ "regex": "walking (\\d+) steps?", "canonical": "walk forward $1 steps" },
{ "regex": "turning right (\\d+) deg(?:ree(?:s)?)?", "canonical": "turn right $1 degrees" },
{ "regex": "turning left (\\d+) deg(?:ree(?:s)?)?", "canonical": "turn left $1 degrees" },
{ "regex": "turning (\\d+) deg(?:ree(?:s)?)?", "canonical": "turn right $1 degrees" },
{ "regex": "(?:أمشي للخلف|أتحرك للخلف|أرجع|أتراجع) (\\d+) خطوات", "canonical": "walk backward $1 steps" },
{ "regex": "(?:أمشي|أتحرك|أتقدم)(?: للأمام| للامام)? (\\d+) خطوات", "canonical": "walk forward $1 steps" },
{ "regex": "(?:أستدير|أدور) (?:يميناً|يمينا|يمين|لليمين) (\\d+) درجة", "canonical": "turn right $1 degrees" },
{ "regex": "(?:أستدير|أدور) (?:يساراً|يسارا|يسار|لليسار) (\\d+) درجة", "canonical": "turn left $1 degrees" }
]
}