ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
From the 'Code API' link on the sound_play wiki page you can get to the documentation and example for the C++ SoundPlay client.
The function you probably want to use is playWaveFromPkg
; it should look something like this:
int main(int argc, char ** argv) {
ros::init(argc, argv, "example");
ros::NodeHandle nh;
sound_play::SoundClient sc;
sc.playWaveFromPkg("sound_play", "sounds/BACKINGUP.ogg");
ros::spin();
}
2 | No.2 Revision |
From the 'Code API' link on the sound_play wiki page you can get to the documentation and example for the C++ SoundPlay client.
The function you probably want to use is playWaveFromPkg
; it should look something like this:
int main(int argc, char ** argv) {
ros::init(argc, argv, "example");
ros::NodeHandle nh;
sound_play::SoundClient sc;
sc.playWaveFromPkg("sound_play", "sounds/BACKINGUP.ogg");
ros::spin();
}