Ask Your Question
0

Using sound_play in ROS custom nodes written in c/c++

asked 2012-08-14 23:00:34 -0600

roboviz gravatar image

updated 2012-08-16 10:52:13 -0600

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-09-11 10:39:09 -0600

ahendrix gravatar image

updated 2016-06-11 12:29:21 -0600

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

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

edit flag offensive delete link more

Comments

The links are broken

rodrigobdz gravatar imagerodrigobdz ( 2016-06-11 04:13:22 -0600 )edit

The links are now found under the docs directory for each distribution

rodrigobdz gravatar imagerodrigobdz ( 2016-06-11 04:32:51 -0600 )edit

Fixed the links. Thanks for catching that.

ahendrix gravatar imageahendrix ( 2016-06-11 12:29:56 -0600 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2012-08-14 23:00:34 -0600

Seen: 2,178 times

Last updated: Jun 11 '16