Playing Sound Files .wav [closed]
I am attempting to play basic wav files in one of my ROS nodes. I tried using system("canberra-gtk-play -f file.wav")
, but then I realized it negatively impacted the behaviour of my program. Why is that, precisely? I suppose that such system calls are not thread safe? Anyway, that is not my real question.
What would be the best way of playing a short wav file in ROS? I found the ROS sound_play package, but I would rather not rely on another ROS node if possible...