ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

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

roboviz gravatar image

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

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 -0500

ahendrix gravatar image

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

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 image rodrigobdz  ( 2016-06-11 04:13:22 -0500 )edit

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

rodrigobdz gravatar image rodrigobdz  ( 2016-06-11 04:32:51 -0500 )edit

Fixed the links. Thanks for catching that.

ahendrix gravatar image ahendrix  ( 2016-06-11 12:29:56 -0500 )edit

Question Tools

Stats

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

Seen: 2,332 times

Last updated: Jun 11 '16