Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question/Tutorial : how to effectively use audio_capture_node in ROS2 #239

Open
antbono opened this issue Sep 5, 2023 · 3 comments
Open

Comments

@antbono
Copy link

antbono commented Sep 5, 2023

Hello everyone!
I am quite new to ros2 and I am trying to understand how to effectively use audio_capture_node.
I think that a common case is recording when some conditions are true and, possibly, for a variable period of time.
How can you do this? Do you launch this node from another one? If yes, how?
I hope the question is clear.

Thanks!

@knorth55
Copy link
Member

knorth55 commented Sep 5, 2023

please read launch files and figure out how to use it.
you may be need to use audio_play, too.
https://github.com/ros-drivers/audio_common/tree/ros2/audio_capture/launch

@antbono
Copy link
Author

antbono commented Sep 5, 2023

Hi @knorth55! Thank you very much for the quick reply :)

I have already taken a look to capture.launch.py and capture_to_file.launch.py.
For my basic understanding of ROS2 launch files, in those above there are nodes' parameters declarations (device, format, bitrate, etc.) and their default values.
How should I use the launch file to launch and stop the node as needed?

Thank you again

@weeshal
Copy link

weeshal commented Oct 5, 2023

@antbono You can look into ros2 components. The capture node was recently written as a component so you can load and unload it as necessary. The link I have attached uses the command line interface, but you'll need to use ros2 services to emulate a similar workflow in rclpy/rclcpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants