Shortcut in Unix/Linux/OSX

OSX 2010. 3. 8. 00:16

sudo ln -s /Applications/MATLAB_R2008b.app/bin/matlab /usr/bin/matlab

:

NAO installation

OSX 2010. 3. 3. 17:20

Installation

Follow the steps below to install the SDK on your Mac OS X computer:

  1. Download "Mac Leopard nao SDK" from the Aldebaran website.
  2. Extract the contents of the SDK (.tar.gz) file in a directory (for example in "~/naoqi/").
  3. Create an environment variable AL_DIR: export AL_DIR="/home/mylogin/naoqi/" (of course, change 'mylogin' by your login). It can be useful to set it in the .bashrc file for permanent export.
    Note:

    AL_DIR must be set to the directory which contains the README file.

We are now ready to compile nao SDK examples.

Warning:

Remember that the Cross compilation is only available for Linux.


Compilation instructions (HelloWorld sample)

There are two ways to compile a module:

  • As an executable (remote modules): each modules package creates an independent executable stored in "$AL_DIR/modules/bin/". At startup you need to specify the IP and the port of the NaoQi running.
  • As a library: each modules package creates a dynamic library stored in "$AL_DIR/modules/lib/". To make this library loaded by NaoQi, the $AL_DIR/module/lib/autoload.ini file needs to be updated with the name of your modules library.

CMake compilation tools is used to generate make or IDE project (XCode, ...).

Compiling modules as executable

Follow the steps below to compile NaoQi SDK examples as executable:

  1. Be sure that the NaoQi executable and modules packages are not running.
  2. Go to the $AL_DIR/modules/src/examples/ directory.
  3. Create and jump into a temporary build directory (example $AL_DIR/modules/src/examples/build/).
  4. Run cmake ..
  5. Run the configuration command ccmake ..
  6. Be sure that the HELLO_WORLD_IS_REMOTE option is set to ON.
  7. Reconfigure by pressing c.
  8. Quit cmake configuration by pressing g.
  9. Then compile: make. The generated binaries are copied to the modules/bin directory.
  10. Edit the autoload.ini file ($AL_DIR/modules/lib/autoload.ini).

    > The line helloworld must not be present.

    > "Autoload.ini" is used to load dynamic library at startup.

Note:

At anytime, you can reset your project by deleting contents of the build directory and relaunch 'cmake ..'

Note:

You can generate a XCode project with the command cmake -G XCode ..

Note:

Many options are available with cmake, refer to the CMake website for further information.

Now let's start modules packages executable:

  1. Start the main broker by launching NaoQi executable ($AL_DIR/bin/naoqi).
  2. Start helloworld executable ($AL_DIR/modules/bin/helloworld).

    > You will see some log in the mainbroker terminal.

  3. Run the python file to test helloworld:

    a. cd $AL_DIR/modules/src/examples/helloworld/test

    b. python test_mymodule.py

At this point, the log message "Info : MyModule : Hello World!" is printed on the mainbroker (NaoQi) terminal.

Note:

If a module package is compiled as an executable, you can connect it to the robot by editing the IP (and port if needed) of the main broker in the test_helloworld.rb file.

Note:

Once you have launched a broker, you can see the generated API http web page by using the IP and the port of this broker : http://127.0.0.1:9559 . Here you can find modules and methods descriptions.

Warning:

The socket server may not be available when starting NaoQi. Two things can lead to this situation:

- NaoQi crashed: wait few seconds, the operating system is going to free the socket.

- NaoQi is still alive: kill NaoQi and restart.

Compiling modules as dynamic library

Follow the steps below to compile NaoQi SDK examples as library:

  1. Be sure that NaoQi executable and modules packages are not running.
  2. Go to the $AL_DIR/modules/src/examples/ directory.
  3. Create and jump into a temporary build directory (example: $AL_DIR/modules/src/examples/build/).
  4. Run cmake..
  5. Run the configuration command ccmake..
  6. Switch OFF the HELLOWORLD_IS_REMOTE option.
  7. Reconfigure project by pressing c.
  8. Quit cmake configuration by pressing g.
  9. Then compile: make..

    > The generated libraries are copied to the modules/lib directory ($AL_DIR/modules/lib/helloworld.so).

  10. Edit the autoload.ini file ($AL_DIR/modules/lib/autoload.ini) by adding this line: helloworld (before the [remote] line).
  11. Start NaoQi executable ($AL_DIR/bin/naoqi).

    > The mainBroker starts and the module MyModule is loaded (cf log message).

  12. Run the python file to test helloworld:

    a. cd $AL_DIR/modules/src/examples/helloworld/test

    b. python test_mymodule.py

At this point, the log message "Info : MyModule : Hello World!" is printed in the mainbroker (NaoQi) terminal.

Warning:

The socket server may not be available when starting NaoQi. Two things can lead to this situation:

- NaoQi crashed: wait few seconds, the operating system is going to free the socket.

- NaoQi is still alive: kill NaoQi and restart.

:

Gantt Chart in Google Docs

Etc 2010. 2. 17. 16:07

Google Spreadsheets Tips: Gantt Chart (Microsoft Project-like) using Widget

Google Spreadsheets is a powerful web application to do everything you do using Excel. A nice way to use it is to manage a project plan with a gantt chart (microsoft project-like) and share it on-line with your team.This is a free and versatile solution to do that. This tutorial illustrates how to use Google Spreadsheets Viewpath Gadget to implement it.


Take a look at this spreadsheet


Step 1: Project Plan structure
First step is defiing your project plan structure. I suggest you to use this basic structure:
Column A: Task ID (WBS) (an unique ID which identifyes each task with a progressive number).
Column B: Task description (a short description of the activity).
Column C: Percentage of completion (0%-100%).
Column D: Predecessor (finish-start relationships between tasks).
Column E: Start date (task start date).
Column F: Finis date (task finish date).
The result is something like this:



All previous fields are required for viewpath gadget but, if you want, you can add other columns with other infos (for example the name of a resource assigned to each task, task duration in terms of day, ecc...). When your project plan structure is completed you are ready to add Gantt Chart using Google Spreadsheets Viewpath Gadget.

Step 2: Add Gantt Gadget
Click on Chart icon and select Gadget option.



In the Gadget window find and select Gantt Chart gadget (by Viewpath) and click on Add to spreadsheet button:



In the option window assign all required parameters to the correct column of your project plan structure (for example Start dates in this example are in the column E):



After assigned all columns, click on apply button and see the result. Now you can save your project plan , publish and share it with all member of your team.
: