-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Don edited this page Jul 5, 2013
·
17 revisions
Refer to https://github.com/dnajd/FluentNao for info on how to get setup to use the python code locally
You can access the alberian api directly from the FluentNao.nao class. FluentNao relies on NaoUtil (https://github.com/davesnowdon/naoutil) and it's proxy short names for this.
Access all proxy off the nao.env object
- Look here for full list of proxy short names
- https://github.com/davesnowdon/naoutil/blob/master/naoutil/src/main/python/naoutil/naoenv.py
These are the fluent nao classes and their methods.
| Class Name | Description | Contains |
| Nao | low level methods for handling motion, duration, threading, etc. | head, arms, elbows, wrists, hands, ankles, legs |
| Head | head yaw and pitch | |
| Arms | shoulder pitch and yaw | elbows, wrists, hands |
| Elbows | elbow roll and yaw | wrists, hands |
| Wrists | wrist yaw | hands |
| Hands | open and close | |
| Legs | Currently uses Hip pitch, Knee pitch and balance | feet |
| Feet | ankle pitch and roll | |
| Audio | play audio files from url | |
| Naoscript | Used to run a huge string of naoscripts (lines split by carriage returns); also can remotely fetch scripts by id from naoscript.herokuapp.com | |
| Leds | Control the led's; this needs to be expanded |
Note, most of these methods include left and right variations. For example nao.arms.up puts both arms up, nao.arms.right_up and nao.arms.left_up can control each arm individually. Same for legs, elbows, hands, etc.
| Method Name | Description |
| say | pass text to this method to make nao speak |
| stiff | turns on all motor tension |
| relax | turns off all motors; careful nao could collapse |
| set_duration | sets default duration for all nao scripts; number of seconds movement should take |
| go | block until all naoscript executed up to that point is complete, then carry on |
| stand_init | |
| sit_relax | |
| sit_relax | |
| stand_zero | |
| lying_belly | |
| lying_back | |
| stand | |
| crouch | |
| sit |
| Method Name | Description |
| left | turn head left 90 degrees |
| right | turn head right 90 degrees |
| forward | look forward |
| up | look up |
| down | look down |
| center | look at horizon |
| Method Name | Description |
| forward | |
| out | |
| up | |
| down | |
| back |
| Method Name | Description |
| bent | |
| straight | |
| turn_up | |
| turn_down | |
| turn_in |
| Method Name | Description |
| center | |
| turn_out | |
| turn_in |
| Method Name | Description |
| open | |
| close |
Be very careful with these methods, they can very easily make nao fall.
| Method Name | Description |
| balance | |
| left_balance | |
| right_balance | |
| left_up | |
| right_up | |
| left_down | |
| right_down | |
| left_knee_bent | |
| right_knee_bent | |
| left_straight | |
| right_straight |
| Method Name | Description |
| point_toes | |
| raise_toes | |
| turn_out | |
| turn_in | |
| center |
| Method Name | Description |
| play | plays a url |
| stop_all | stops all audio |
| set_master_volume | value between 0 - 1 |
| Method Name | Description |
| get | pass id from animation on http://naoscript.herokuapp.com and nao will fetch / run it |
| run_script | pass string of commands; optionally specify split character. By default each line of naoscript code needs to end with a semi-colon nao.say('hi');nao.arms.up(); |
| Method Name | Description |
| off | turns all leds off |
| eyes | Choose color and intensity of eyes; color should be true hex (ex. 0xCC0033) |
| head | |
| ears | |
| chest | |
| feet |