Quick tutorial

If you dislike documentation try this. Run your python interpreter after installing SDK:

from naoqi import ALProxy memProxy = ALProxy("ALMemory",robot_IP,9559) memProxy.insertData("myValueName", 0)

Congratulations, you have shared value 0 to other modules and associated it with "myValueName" variable name. Call exactly the same way all the functions of the blue documentation. Python script can call remote function from your PC to the robot but also very quickly on the robot embedded interpreter. If you don't want to be blocked in function, make a parallel call:

from naoqi import ALProxy audioProxy = ALProxy("ALTextToSpeech",robot_IP,9559) audioProxy.post.say("my first parallel call") # .post make a parallel call.

In C++, create a module as described in the documentation. Then write:

#include "almemoryproxy.h" void myModule::init(void) { getParentBroker()->getMemoryProxy()->insertData(""myValueName",0); }

Use cmake to create your project (makefile on linux or .sln on Microsoft Visual Studio), compile your project, load your library in NAOqi with command line: naoqi --load myModule. myModule.so is loaded and init method is automatically called.





Copyright © 2010 Aldebaran-Robotics - All rights reserved