Search code examples
sshpepper

PEPPER (Softbank Robotics): How can I send "external" data (e.g., sensor) to Coregraphe Software?


I'm trying to import "external" data (e.g., a string, a sensor value, etc.) to Coregraphe environment. In a more large context, I need, for example, to send - in a certain way - a letter "A". The Coregraphe-based system must recognize it and actuate a preset operation.

Up to now, I tried to write a log message via PuTTY, by logging in Pepper robot and using:

qicli log-send -m A

I can see it (i.e., the message) in the log INFO of the Coregraphe environment:

[INFO ] qicli.qilog.logsend /home/opennao/work/release-2.5/sdk/libqi/bin/qicli/qilog.cpp:subCmd_logSend:143 hello there, do you read me?

but I'm not able to extract it for further processing.

Someone could kindly help me?

Thank you very much guys.

Giovanni


Solution

  • ALMemory would be the standard way of doing that. You can call it from Python, javascript or the command line, for example

    qicli call ALMemory.raiseEvent MyCustomEvent MyValue

    You can then watch this ALMemory value in Choregraphe, for example see this tutorial:

    https://developer.softbankrobotics.com/pepper-naoqi-25/naoqi-developer-guide/other-tutorials/choregraphe-tutorials/creating-python-boxes#choregraphe-tuto-right-bumper-almemory

    You can also watch this value directly in Python or Javascript (or C++ etc.)