0
$\begingroup$

Rosanswers logo

Hi,

I am wondering how I could tell a python script to execute from a c++ code.
My specific problem is, to activate a pocketsphinx script to recognize spoken commands.
But pocketsphinx is written in python...

Is the solution to make an action client / server for the communication?
I am new to ROS and a bit confused on how this transition between C++ and python works.

Regards, Max


Originally posted by madmax on ROS Answers with karma: 496 on 2011-12-17

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You can define a simple service in Python with a C++ client.

If you need a more elaborate structure for controlling the service, actionlib may provide a better solution.


Originally posted by joq with karma: 25443 on 2011-12-17

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by madmax on 2011-12-17:
I see, thank you for the explanation!

Comment by joq on 2011-12-17:
You can return a result message from a simple service. Actionlib provides more sophisticated features, such as cancelling or preempting an earlier request.

Comment by madmax on 2011-12-17:
So, actionlib when I want to have feedback?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.