...
Предупреждение |
---|
Скрипт должен быть исполняемым |
Пример использования нескольких модулей в скрипте:
Блок кода | ||
---|---|---|
| ||
{ "parts": [{ "arms": [{ "command": "left x1 x2 x3 x4 x5 x6 x7 x8", "id": 0 }, { "command": "right x1 x2 x3 x4 x5 x6 x7 x8", "id": 1 }, { "command": "sleep 1.0", "id": 2 }] }, { "neck": [{ "command": "angle x1 x2 x3", "id": 0 }, { "command": "sleep 1.0", "id": 1 }] }, { "torso": [{ "command": "angle x1 x2 x3 x4", "id": 0 }, { "command": "sleep 1.0", "id": 1 }] }, { "play": [{ "command": "play song.mp3", "id": 0 }, { "command": "sleep 36", "id": 1 }, { "command": "stop", "id": 2 }] }, { "led": [{ "command": "pub head sharp_on 65 1 #FFFFFF 3 false", "id": 0 }, { "command": "sleep 0.2", "id": 1 }, { "command": "pub head sharp_on 65 1 #FFFFFF 6 false", "id": 2 }, { "command": "sleep 0.2", "id": 3 }, { "command": "pub head sharp_on 65 1 #FFFFFF 12 false", "id": 4 }, { "command": "sleep 0.2", "id": 5 }] }, { "bash": [{ "command": "/opt/promobot/share/promobot_scripts/scripts/3.1/UpVolume.sh", "id": 0 }] }, { "drive": [{ "command": "forward 0.5", "id": 0 }, { "command": "sleep 1.0", "id": 1 }, { "command": "left 0.5", "id": 2 }, { "command": "sleep 1.0", "id": 3 }] }, { "play_motion": [{ "command": "play script.yaml", "id": 0 }, { "command": "sleep 60", "id": 1 }] }, { "eyes": [{ "command": "pub heart.gif", "id": 0 }, { "command": "sleep 1.0", "id": 1 }] }, { "promo": [{ "command": "url Image.jpg", "id": 0 }, { "command": "sleep 5", "id": 1 }, { "command": "url https://google.com", "id": 2 }, { "command": "sleep 5", "id": 3 }] }] } |
...