strands-project/strands_ui

[mary-tts] Mary fails to respond

Closed this issue · 6 comments

We are having an issue with mary_tts becoming unresponsive and ignoring goals sent to both the service and the actionlib server. Mary is being run via strands_ui. When strands_recovery_behaviours attempts to call mary when the robot is stuck, the following output appears:

[INFO] [WallTime: 1429600423.956691] action triggered: say I am having problems moving. Please check my screen for instructions on how to help me.                                                                          │
[WARN] [WallTime: 1429600433.958820] mary speach action failed; maybe took too long (more than 10 seconds), maybe pulse is broke.

A minimal (non-)working example of code that fails to produce any speech is:

client = actionlib.SimpleActionClient("/speak", mary_tts.msg.maryttsAction)
client.wait_for_server(timeout=rospy.Duration(30))
goal = maryttsGoal()
goal.text = 'Hello, I am a talking robot!'
client.send_goal(goal)
client.wait_for_result()

This hangs at wait_for_result() for around ~10 seconds before hitting what I assume is a hard timeout, and returning. Calling the service directly, like this:

rosservice call /ros_mary 'Hello!'
success: True

Returns instantly, reporting success but with no speech occurring. We have the following mary-related nodes and topics available:

Nodes:
/ros_mary_bridge

Topics:
/speak/cancel
/speak/feedback
/speak/goal
/speak/result
/speak/status

Sound on the robot (Bob) is on and works fine when tested.

Any ideas as to why mary won't respond to our requests?

How did you start strands_ui? Via tmux and ssh or on the robot directly? Try DISPLAY=:0 roslaunch strands_ui strands_ui.launch

Yeah, being started in a tmux session.

Should have noted that I've tried the above code/commands both on a ssh terminal, on tmux and on the robot directly, all with the same result.

When you start it from a remote PC in a tmux session, it will try to communicate with the X server and pulse on the remote machine. By exporting DISPLAY=:0 before starting it, it should use pulse on the robot. Let me know if that works.

So this worked once, using the python code snippet above, before returning to the previous behaviour of hanging at wait_for_result(). Output of the strands_ui terminal:

[INFO] [WallTime: 1429698198.616906] action triggered: say Hello, I am a talking robot!                                                                         
[INFO] [WallTime: 1429698198.646156] say Hello, I am a talking robot!           
[INFO] [WallTime: 1429698202.888786] start playing sound                        
[INFO] [WallTime: 1429698202.939464] updated priority map: {'/ros_mary_bridge': 1.0}                                                                            
[INFO] [WallTime: 1429698202.940040] setting volume to 1.000000                 
[INFO] [WallTime: 1429698205.504245] updated priority map: {'/ros_mary_bridge': 0.0}                                                                            
[INFO] [WallTime: 1429698205.504704] setting volume to 1.000000                 
[WARN] [WallTime: 1429698208.621379] mary speach action failed; maybe took too long (more than 10 seconds), maybe pulse is broke.                               
[INFO] [WallTime: 1429698215.739368] action triggered: say Hello, I am a talking robot!                                                                         
[WARN] [WallTime: 1429698225.739882] mary speach action failed; maybe took too long (more than 10 seconds), maybe pulse is broke.                               
[INFO] [WallTime: 1429698242.787164] action triggered: say Hello, I am a talking robot!                                                                         
[WARN] [WallTime: 1429698252.787713] mary speach action failed; maybe took too long (more than 10 seconds), maybe pulse is broke. 

This might be something to look at for @marc-hanheide.
I also noticed that the goal is not properly terminated when the wav file has been played but rather waits for it to time out.

should be fixed in #90