1

I'm using Python 3.5.10-slim-buster (Docker) with the Pepper robot from Softbank. The NAOqi version on the robot is 2.5.8 (taken from /var/log/naoqi/servicemanager/system.Naoqi.log). I got qi v. 3.0.0 via pip.

I want to subscribe to events with

pepper = qi.Application()
pepper.start()
session = pepper.session
memory = session.service("ALMemory")

def touch_event(*args, **kwargs):
    pass

subscriber = memory.subscriber("ALTouch/TouchChanged") # throws RuntimeError: Invalid signature
if subscriber:
    subscriber.signal.connect(touch_event)

Creating the session directly like in http://doc.aldebaran.com/libqi/api/python/session.html didn't work either.

Does anyone know how to make this work?

I've referenced this issue in https://github.com/aldebaran/libqi-python/issues/13.

tldr: The issue occurs most likely due to a missmatch between the NaoQi OS and the coresponding libQi library. My workaround for this is to run my code directly on the pepper robot.

Even with the latest version of libqi and the fix from Victor (see https://github.com/victorpaleologue/libqi-python/tree/47df0833c707cfd2a6a4c86765db423f319e029d) it didn't work and resulted in the same error.

ComanderKai77
  • 460
  • 6
  • 14
  • Hello, I tried to call memory.subscriber from a freshly rebuilt qi (3.0.0 and 3.1.0, in a Python 3.10) and it worked fine. Could you update your question with: how you installed qi, what is your host OS, and which NAOqi version your Pepper is running? Could you try creating a session directly? http://doc.aldebaran.com/libqi/api/python/session.html – Victor Paléologue Feb 08 '23 at 17:16
  • 1
    I've updated the question. I also tried to build qi from the official repository and your repo with Python 3.10.6 on Ubuntu 22.04 but I couldn't get that to work. What was your setup to build qi? – ComanderKai77 Feb 09 '23 at 19:19
  • I'm on MacOS 13.1, arm64, so I needed to patch the repo: https://github.com/victorpaleologue/libqi-python. I build it from its `pipenv shell` with this command: `PKG_CONFIG_PATH=/opt/homebrew/opt/openssl@3/lib/pkgconfig GOOGLETEST_VERSION=1.12.1 LIBQI_VERSION=3.0.0 BOOST_VERSION=1.81 python3 ./setup.py bdist_wheel`. It requires boost and openssl to be installed with `brew`. It works with a NAOqi 2.1 on a NAO. – Victor Paléologue Feb 13 '23 at 10:31
  • 1
    Small update: Building qi 3.1.1 with Python 3.10.6 on Ubuntu 22.04 resulted in the same error. – ComanderKai77 Feb 20 '23 at 12:36

0 Answers0