|
1 | 1 | {
|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 |
| - "attachments": {}, |
5 | 4 | "cell_type": "markdown",
|
6 | 5 | "metadata": {},
|
7 | 6 | "source": [
|
|
14 | 13 | "metadata": {},
|
15 | 14 | "outputs": [],
|
16 | 15 | "source": [
|
17 |
| - "%pip install ipynao==0.2" |
| 16 | + "%pip install ipynao==0.3" |
18 | 17 | ]
|
19 | 18 | },
|
20 | 19 | {
|
|
45 | 44 | ]
|
46 | 45 | },
|
47 | 46 | {
|
48 |
| - "attachments": {}, |
49 | 47 | "cell_type": "markdown",
|
50 | 48 | "metadata": {},
|
51 | 49 | "source": [
|
|
64 | 62 | ]
|
65 | 63 | },
|
66 | 64 | {
|
67 |
| - "attachments": {}, |
68 | 65 | "cell_type": "markdown",
|
69 | 66 | "metadata": {},
|
70 | 67 | "source": [
|
|
96 | 93 | {
|
97 | 94 | "cell_type": "code",
|
98 | 95 | "execution_count": null,
|
99 |
| - "metadata": {}, |
| 96 | + "metadata": { |
| 97 | + "tags": [] |
| 98 | + }, |
100 | 99 | "outputs": [],
|
101 | 100 | "source": [
|
102 | 101 | "tts.say(\"how is it going?\")"
|
|
125 | 124 | ]
|
126 | 125 | },
|
127 | 126 | {
|
128 |
| - "attachments": {}, |
129 | 127 | "cell_type": "markdown",
|
130 | 128 | "metadata": {},
|
131 | 129 | "source": [
|
|
244 | 242 | ]
|
245 | 243 | },
|
246 | 244 | {
|
247 |
| - "attachments": {}, |
248 | 245 | "cell_type": "markdown",
|
249 | 246 | "metadata": {
|
250 | 247 | "tags": []
|
|
267 | 264 | ]
|
268 | 265 | },
|
269 | 266 | {
|
270 |
| - "attachments": {}, |
271 | 267 | "cell_type": "markdown",
|
272 | 268 | "metadata": {},
|
273 | 269 | "source": [
|
|
385 | 381 | ]
|
386 | 382 | },
|
387 | 383 | {
|
388 |
| - "attachments": {}, |
389 | 384 | "cell_type": "markdown",
|
390 | 385 | "metadata": {},
|
391 | 386 | "source": [
|
|
425 | 420 | "async def little_dance():\n",
|
426 | 421 | " await motion.async_wakeUp()\n",
|
427 | 422 | " await animate.async_run(\"animations/Stand/Gestures/Hey_2\")\n",
|
428 |
| - " await animate.async_run(\"animations/Stand/Gestures/Enthusiastic_5\")\n", |
429 |
| - " await animate.async_run(\"animations/Stand/Gestures/No_9\")\n", |
430 |
| - " await motion.async_moveTo(0, 0.2, 0)\n", |
431 |
| - " await animate.async_run(\"animations/Stand/Gestures/Explain_9\")\n", |
432 |
| - " await animate.async_run(\"animations/Stand/Gestures/You_4\")\n", |
433 |
| - " await animate.async_run(\"animations/Stand/Gestures/Explain_11\")\n", |
434 |
| - " await motion.async_moveTo(0, -0.2, 0)\n", |
435 |
| - " await animate.async_run(\"animations/Stand/Gestures/YouKnowWhat_6\")\n", |
436 |
| - " await animate.async_run(\"animations/Stand/Gestures/No_8\")\n", |
437 |
| - " await posture.async_goToPosture(\"LyingBack\", 1.0)\n", |
438 |
| - " await posture.async_goToPosture(\"Stand\", 1.0)\n", |
439 |
| - " await animate.async_run(\"animations/Stand/Gestures/BowShort_1\")\n", |
440 | 423 | " await motion.async_rest()"
|
441 | 424 | ]
|
442 | 425 | },
|
|
451 | 434 | "asyncio.ensure_future(little_dance())"
|
452 | 435 | ]
|
453 | 436 | },
|
| 437 | + { |
| 438 | + "cell_type": "markdown", |
| 439 | + "metadata": {}, |
| 440 | + "source": [ |
| 441 | + "### Error Handling" |
| 442 | + ] |
| 443 | + }, |
454 | 444 | {
|
455 | 445 | "cell_type": "code",
|
456 | 446 | "execution_count": null,
|
457 |
| - "metadata": {}, |
| 447 | + "metadata": { |
| 448 | + "tags": [] |
| 449 | + }, |
458 | 450 | "outputs": [],
|
459 |
| - "source": [] |
| 451 | + "source": [ |
| 452 | + "w.disconnect()\n", |
| 453 | + "w" |
| 454 | + ] |
| 455 | + }, |
| 456 | + { |
| 457 | + "cell_type": "code", |
| 458 | + "execution_count": null, |
| 459 | + "metadata": { |
| 460 | + "tags": [] |
| 461 | + }, |
| 462 | + "outputs": [], |
| 463 | + "source": [ |
| 464 | + "out = Output()\n", |
| 465 | + "res = asyncio.ensure_future(w.service(\"ALLeds\", out).async_rasta(\"gibberish\"))\n", |
| 466 | + "out" |
| 467 | + ] |
460 | 468 | }
|
461 | 469 | ],
|
462 | 470 | "metadata": {
|
|
0 commit comments