Search code examples
nao-robot

Why is NAOs startup interfering with my default behavior?


I created a main behavior for my NAOv6 (nao_main_behavior_V2) that is supposed to be executed on startup. It sets the robots language to german, activates some of NAOs LEDs and waits for me to touch his head sensors to activate a different behavior called Manual_Mode.

Every time I start NAO he executes the main behavior but stops as soon as I touch his head sensors to activate the other behavior. Using the Choreograph I can find this Error message:

[ERROR] behavior.box :onInput_onStart:16 _Behavior__nao_main_behavior_v28d046fMain2726901504:/Error! Manual_Mode_12: _Behavior__nao_main_behavior_v28d046fMain2726901504:/Manual Mode_29: ALBehaviorManager::runBehavior Box _Behavior__nao_main_behavior_v28d046fManualMode2716269632:/Speech Reco. Ger_1 has failed with error: Traceback (most recent call last): File "/opt/aldebaran/lib/python2.7/site-packages/albehavior.py", line 120, in _safeCallOfUserMethod func() File "", line 55, in onInput_onStart RuntimeError: ALSpeechRecognition::pushContexts AsrHybridNuance::xPushContexts You need to stop or pause the ASR engine to be able to make this call.

The Manual_Mode behavior accesses the speech recognition so I can say commands but I never access anything speech recognition related earlier.

Starting (or restarting) the behavior manually using Choreograph works just fine, everything works like it is supposed to and I don't get any Errors.

I tried using a third behavior during startup that starts the Main_Behavior but I get the same result.

The behavior was originally written for a NAOv5 and it worked without any problems.


Solution

  • I found a workaround. I created a launch trigger condition for my behavior:

    (('Launchpad/LifeTime' ~30 ))

    After NAO finishes its startup and 30 seconds have passed my behavior is being triggered and works without any problems.