Ask Your Question
0

actionlib appears to work differently with Kinetic

asked 2017-06-18 08:53:43 -0600

burtbick gravatar image

I was using actionlib.SimpleActionClient('sound_play', SoundRequestAction) under ROS Indigo and it was working fine for doing speech and sound output. Basically I had a python script that subscribed to a topic that received the output from pocketsphinx, parsed the recognized text, executed commands and spoke associated text.

This worked just fine under Indigo, but the same exact code doesn't produce ANY speech or wave file output under Kinetic.

I've determined that if I do the actionlib related processing in the main of the python script that it does work fine, but attempting to do the actionlib sound_play from the context of the callback produces no output. No errors, and sound_play reports that it has spoken or played the wav file.

Has anyone else run into this with Kinetic? There is some more information below.

I had a similar problem with OpenCV with Kinetic. It appears that callbacks may be happening on a different thread and that is breaking things. With the OpenCV issue the imshow() function would not return, no errors and nothing drawn in the window. To resolve that, at least short term, I changed the code to defer the creation of the OpenCV windows so that it happened in the context of the callback function(s). A similar approach with the actionlib processing has so far failed to resolve the issue.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-18 16:50:17 -0600

burtbick gravatar image

What I did to get this working again with Kinetic was to create a new node that wraps the actionlib processing, so in my voice head test node I publish a "speech" topic to this new node that is the string of text to speak. The new node gets the string from the topic and makes the calls to actionlib to speak. Then when the actionlib result is available I parse the result and publish a message for my test application telling how long the operation took. Likewise I publish a wav topic passing the path to a wave file to play.

This seems to work quite well, So if someone else should hit the same issue that I was having with actionlib and Kinetic this should resolve it.

What was I using actionlib? I needed to get an approximation of how long the speech took. Since I need to block voice recognition while the robot is speaking, this works well. And eliminates the robot trying to respond to any speech that it has output.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-06-18 08:53:43 -0600

Seen: 58 times

Last updated: Jun 18 '17