0
$\begingroup$

Rosanswers logo

Hi all,

I successfully managed to get sound_play working on my machine.

I was just wondering if there is a way to use it through c/c++ code within my node.

I found something for python in http://www.pirobot.org/blog/0022/ but not for c/c++.

For the time being I used a system call within the code as follows: system("rosrun sound_play say.py "Hi There"");

A small barebone example code would be greatly appreciated.

Thanks in advance.


Originally posted by roboviz on ROS Answers with karma: 26 on 2012-08-14

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

sound_play exposes a C++ API that's documented here: http://docs.ros.org/latest-available/api/sound_play/html/index.html

There's a simple example here: http://docs.ros.org/latest-available/api/sound_play/html/test_8cpp_source.html


Originally posted by ahendrix with karma: 47576 on 2012-09-11

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by rodrigobdz on 2016-06-11:
The links are broken

Comment by rodrigobdz on 2016-06-11:
The links are now found under the docs directory for each distribution

Comment by ahendrix on 2016-06-11:
Fixed the links. Thanks for catching that.

$\endgroup$

Your Answer

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