ROS2 wrapper for the ReSpeaker 4 Mic Array. Publishes audio and direction-of-arrival information.
Based on previous wrappers for ROS.
-
For ROS2 Humble installation refer to here:
https://docs.ros.org/en/humble/Installation.html -
Copy the udev rules from
respeaker_ros/config/40-respeaker.rulesinto/etc/udev/rules.d/.
!!!There are different files in the/configfolder, try putting the40-respeaker.rulesfirst, in case of an error, try the second config60-respeaker.rules. -
sudo systemctl restart udev -
Then reconnect your device.
-
ReSpeaker setup:
- sudo pip install -r requirements.txt
- sudo apt install python3-pyaudio
- git clone https://github.com/respeaker/usb_4_mic_array.git
- cd usb_4_mic_array
- sudo python dfu.py --download 6_channels_firmware.bin # The 6 channels version
- Build audio_common from source until it gets released into ROS2, you need the ros2 branch:
cd your_workspacemkdir srccd srcgit clone -b ros2 https://github.com/ros-drivers/audio_common.git
- Then:
https://github.com/SemuBot/respeaker_ros.gitcd ..rosdep install --from-paths src -y --ignore-srccolcon build --packages-select audio_common_msgs audio_capture audio_playcolcon build --packages-select respeaker_ros
- Finally, open another terminal to run the node:
source install/local_setup.bashros2 run respeaker_ros respeaker_node
- If you need
sound_playfromaudio_common, then build your workspace with thecolcon buildcommand, but the sound_play module might cause errors. - In case of an error on ROS2 Humble regarding
ament_python_install_packagerefer tohttps://github.com/ros2/rosidl_python/pull/187(easy fix).