Actionlauncher » History » Version 1
T. Dankert, 07/15/2016 03:52 PM
1 | 1 | T. Dankert | h1. Action Launcher |
---|---|---|---|
2 | 1 | T. Dankert | |
3 | 1 | T. Dankert | The ActionLauncher is a python script that connects to NaoQi, waits for a series of touch events to occur on the _touchpad_ on the head of the robot and launches an action (that can be defined in a python file or a Choregraphe behavior) depending on what combination of _keys_ (front, middle, rear) was touched. |
4 | 1 | T. Dankert | |
5 | 1 | T. Dankert | As an example, it could bind a sequence like "front, front, middle, rear" to launch a Choregraphe behavior that makes some Tai Chi moves. |
6 | 1 | T. Dankert | |
7 | 1 | T. Dankert | The current version works on NaoQi 1.12 |
8 | 1 | T. Dankert | |
9 | 1 | T. Dankert | h2. Installation |
10 | 1 | T. Dankert | |
11 | 1 | T. Dankert | Download an archive file from the files section and unpack it or checkout the current trunk or branch code from the svn (URL on the overview page). |
12 | 1 | T. Dankert | |
13 | 1 | T. Dankert | ActionLauncher works best if you install the script itself on the robot in @~/naoqi/bin@ and all the python modules it uses (to launch the actions etc.) in @~/naoqi/lib@. So from the @src@ folder copy @ActionLauncher@ to @~/naoqi/bin@ and the remaining python files to @~/naoqi/lib@. Ensure that the @ActionLauncher@ script is executable on the robot (@chmod +x ActionLauncher@). |
14 | 1 | T. Dankert | |
15 | 1 | T. Dankert | Some of the standard actions use Choregraphe behaviors. To have them available on the robot, copy all folder including their contents from the @behaviors@ folder to @~/behaviors@ on the robot. |
16 | 1 | T. Dankert | |
17 | 1 | T. Dankert | To automatically start the launcher at boot time, it can (and should) be added to @~/naoqi/preferences/autoload.ini@ as an external process with this entry (if the file does not yet exist, copy it from @/etc/naoqi/preferences/autoload.ini@): |
18 | 1 | T. Dankert | <pre> |
19 | 1 | T. Dankert | [python] |
20 | 1 | T. Dankert | # probably there are already other things registered in this category |
21 | 1 | T. Dankert | /home/nao/naoqi/bin/ActionLauncher |
22 | 1 | T. Dankert | </pre> |
23 | 1 | T. Dankert | |
24 | 1 | T. Dankert | After restarting NaoQi the ActionLauncher should be available and you can test it by launching. |
25 | 1 | T. Dankert | |
26 | 1 | T. Dankert | h2. Action Configuration |
27 | 1 | T. Dankert | |
28 | 1 | T. Dankert | A python module called @setupnao_config.py@ is read from @~/naoqi/lib/python@ that defines the key combinations in a dictionary called @KEY_COMBINATIONS@. They can be extended or changed according to your requirements. See source:trunk/src/setupnao_config.py for an example. |