How to start Aldebaran ServiceManager?

I would like to stop and start the ALTactileGestureservice through ServiceManagerduring my application. I use Choregraphepython too. I tried different options to run ServiceManager, but none of them work. Is there any way to do this?

Edit:

I already tried self.sm = session.service('ServiceManager'), but did not work. The idea is to stop ALTactileGestureas soon as the application starts:
(1) ServiceManager.stopService('ALTactileGesture')(see this )

and start / restart ALTactileGestureuntil the application is completed:
(2)ServiceManager.startService('ALTactileGesture')

My question is: how to achieve ServiceManager, then to use (1) and (2)?

+4
source share
2 answers

(- ):

$ python
import naoqi
s = naoqi.ALProxy("ALServiceManager", "localhost", 9559 )
s.stopService('ALTactileGesture')
>>> False
s.startService('ALTactileGesture')
>>> False # (a bit weird, but ...)

, , , ServiceManager ...

+1

, "" NAOqi. . :

NAOqi ( "" ), API ServiceDirectory. qicli, ..

systemd, , , . ALServiceManager, ( ). " " .

- , , NAOqi , (, "ALFuchsiaBallTracker" ).

, NAOqi ALTactileGesture , ID ALTactileGesture-serv.

ALServiceManager.stop("ALTactileGesture-serv")

( , )

(), , , ALTactileGesture - , ( ), , :)

+1

Source: https://habr.com/ru/post/1688942/


All Articles