Ask Your Question
1

audio_common for ROS2

asked 2020-06-04 02:55:50 -0500

anthares gravatar image

Hi everyone, is there any audio_common equivalent package for ROS2?

Thanks in advance, Cheers, G.

edit retag flag offensive close merge delete

Comments

I have the same question and am not sure whether the project linked in the accepted answer actually addresses this. Hence, I opened a question on the github of github_common: https://github.com/ros-drivers/audio_...

Georg Bartels gravatar image Georg Bartels  ( 2022-02-02 03:04:44 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2020-06-12 02:09:28 -0500

BrettRD gravatar image

I'm trying to build that now.

The ROS topic bridges aren't working yet, but it'll happily stream audio from a robot's sound card to a remote machine or play canned audio

https://github.com/BrettRD/ros-gst-br...

Audio-common was too limited for my application, I've used image messages for audio with a custom encoding string in the past, but I'm about to define some new messages. I'd be glad to have some input.

edit flag offensive delete link more

Comments

Hi BrettRD, thanks for starting and sharing such an ambitious project! My use-case is closer to the original audio_common: Play one from a set of audio files located on disk through ROS commands. Do you have a tutorial or instructions on how to do this with your project? I failed to find this on the linked github page. Cheers!

Georg Bartels gravatar image Georg Bartels  ( 2022-02-02 03:00:55 -0500 )edit

I don't have many examples of using ROS for audio. I have some improvements penciled in for this year though, that includes more docs.

Off the top of my head, A pipeline like this should do something, (something might include eating all of your network bandwidth with raw audio):

Machine with the mic:

gst-launch-1.0 --gst-plugin-path=install/gst_bridge/lib/gst_bridge/ alsasrc ! audioconvert ! rosaudiosink ros-name="mic_node" ros-topic="very_noise"

Machine with the speakers:

gst-launch-1.0 --gst-plugin-path=install/gst_bridge/lib/gst_bridge/ rosaudiosrc ros-name="spk_node" ros-topic="very_noise"  ! audioconvert ! alsasink sync=false

If you have a burning need for compressed audio in ROS, I'd love to field a pull request (even one that doesn't yet work) for a ROS message wrapper and bridge nodes that handle raw GST buffers.

rosrawsink and rosrawsrc are on my wish-list.

At the moment, I use GStreamer's UDP elements to move H264 video, not ROS topics.

BrettRD gravatar image BrettRD  ( 2022-02-02 04:26:28 -0500 )edit
0

answered 2022-02-08 06:58:37 -0500

knorth55 gravatar image

Hi, I'm a maintainer of audio_common. Now, I have no time to implement ROS2 version of audio_common, but I can do it after these busy days. If you are interested in helping me, please visit audio_common repo and have a discussion there. https://github.com/ros-drivers/audio_...

I look forward to seeing your contribution to audio_common repo.

edit flag offensive delete link more
0

answered 2020-06-12 01:21:43 -0500

anthares gravatar image

I have ended up creating my own custom message to wrap audio data.

Cheers, g.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-06-04 02:55:50 -0500

Seen: 427 times

Last updated: Feb 08