1

I have created several apps for NAO in Choregraphe and would like to be able to launch them though a single 'Master' application.

Through Master's dialog box I call ^switchFocus(traffic_lights-7xxxx/behavior_1) and it works fine. It stops Master app and Launches TrafficLights app.

Is there a way to switch back to the Master app once the second app is stopped?

Cain
  • 79
  • 6

1 Answers1

1

There is an alternate overload for switching focus that supports exactly that. In Python, you could write:

life = self.session().service("ALAutonoumousLife")
life.switchFocus("traffic_lights-7xxxx/behavior_1", 1)

In QiChat, you can theoretically perform this kind of calls. Therefore this should work:

^pCall(ALAutonomousLife(traffic_lights-7xxxx/behavior_1, 1))
Victor Paléologue
  • 2,025
  • 1
  • 17
  • 27
  • 1
    Hey Victor, thanks for your reply. I had already tried the [overload alternative](http://doc.aldebaran.com/2-5/naoqi/interaction/autonomouslife-api.html#ALAutonomousLifeProxy::switchFocus__ssCR.iCR) but it didn't work. What **DID** work though was `^pCall(ALAutonomousLife.switchFocus(traffic_lights-xxxx/behavior_1, 1))` . It launches the second app and when the second app is finished it launches the first app again. Thank you Victor – Cain Nov 15 '21 at 09:36