Closed davesnowdon closed 10 years ago
In my environment avahi.find_all_naos() returns an empty list
Noticed that my code was using the old memory.subscribeToEvent() function and changed that to use subscribe_to_event() instead but so far no joy.
Having been checking out old versions of the code: at revision 4e2490a it is definitely working and at revision 43f177b it is definitely broken - I get a message that the subscriber module is starting but do not get any events.
For NAO recorder I've reverted the changes to memory.py and init.py and that has got things working again. When I have more time I'll work out exactly why it was broken.
same experience here. rolled back the revision and events work again
Finally got around to fixing this - sorry it took so long. The root cause appears to be that NAOqi can't handle callbacks with names starting with _
Wow O_O. Thank you for spotting this!
Looking at the doc I am seeing this is not a documented limitation. I will signal this to Aldebaran.
How did you found it actually?
I did a diff of all the changes between the working and broken versions. I ran my snippet of code that demonstrated the issue while observing the tail of the naoqi log on the robot and watching for errors and repeated this several times until I was able to isolate the cause.
At least this seems to be the case on Fedora18 when the broker is started using an IP address (if I don't use an IP address my robot is not located).
I can reproduce this in the python shell (which previously worked)
from naoutil import broker myBroker = broker.Broker("testy", nao_id="192.168.0.71", nao_port=9559) def my_event_callback(data_name, value, message): print 'Event', data_name, value, message memory.subscribe_to_event('RightBumperPressed', my_event_callback)