Skip to content

Commit 2fabb13

Browse files
committed
fix(audio): disable audio capture in sim by default
and allow overwriting the `sample_rate` when running `audio.launch`, as not all driver/device setups allow for the default `sample_rate` of 16000. In a future step we should adapt the `whistle_detector` to support different `sample_rate`s.
1 parent 099cdf5 commit 2fabb13

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<?xml version="1.0"?>
22
<launch>
3+
<!-- Our code currently is not sample_rate agnostic, but this must be overwritable to start the audio_capturer_node
4+
on some audio drivers/devices if they do not support the default sample_rate of 16000. -->
5+
<arg name="sample_rate" default="16000" description="The sample_rate with which the audio should be captured"/>
36

47
<node
58
pkg="audio_common"
69
exec="audio_capturer_node"
710
name="audio_capturer_node"
811
output="screen">
12+
<param name="rate" value="$(var sample_rate)"/>
913
</node>
1014
</launch>

src/bitbots_misc/bitbots_bringup/launch/simulator_teamplayer.launch

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
22
<launch>
3+
<arg name="audio" default="true" description="Whether the audio system should be started" />
34
<arg name="behavior" default="true" description="Whether the behavior control system should be started" />
45
<arg name="behavior_dsd_file" default="main.dsd" description="The behavior dsd file that should be used" />
56
<arg name="game_controller" default="true" description="Whether the Gamecontroller module should be started" />
@@ -16,6 +17,7 @@
1617

1718
<!-- load teamplayer software stack -->
1819
<include file="$(find-pkg-share bitbots_bringup)/launch/teamplayer.launch">
20+
<arg name="audio" value="$(var audio)" />
1921
<arg name="behavior" value="$(var behavior)" />
2022
<arg name="behavior_dsd_file" value="$(var behavior_dsd_file)" />
2123
<arg name="game_controller" value="$(var game_controller)"/>

0 commit comments

Comments
 (0)