A ROS 2 Package for Respeaker Mic Array
-
Install this package
mkdir -p ~/ament_ws/src && ~/ament_ws/src git clone https://github.com/hello-chintan/respeaker_ros2.git git clone https://github.com/hello-chintan/audio_common.git cd ~/ament_ws source /opt/ros/iron/setup.bash rosdep install --from-paths src --ignore-src -i -r -n -y colcon build source install/setup.bash
-
Register respeaker udev rules
Normally, we cannot access USB device without permission from user space. Using
udev, we can give the right permission on only respeaker device automatically.Please run the command as followings to install setting file:
cd ~/ament_ws/src/respeaker_ros2 sudo cp -f ~/ament_ws/src/respeaker_ros2/config/60-respeaker.rules /etc/udev/rules.d/60-respeaker.rules sudo systemctl restart udev
And then re-connect the device.
-
Install python requirements
cd ~/ament_ws/src/respeaker_ros2 sudo pip install -r requirements.txt
-
Update firmware
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
-
Run executables
ros2 launch respeaker_ros2 respeaker.launch ros2 topic echo /sound_direction # Result of DoA ros2 topic echo /sound_localization # Result of DoA as Pose ros2 topic echo /is_speeching # Result of VAD ros2 topic echo /audio # Raw audio ros2 topic echo /speech_audio # Audio data while speeching
To set LED color, publish desired color:
ros2 topic pub /status_led std_msgs/msg/ColorRGBA "r: 0.0 g: 0.0 b: 1.0 a: 0.3"
The configuration file for dynamic_reconfigure in this package is created automatically by reading the parameters from devices.
Though it will be rare case, the configuration file can be updated as followings:
-
Connect the device to the computer.
-
Run the generator script.
rosrun respeaker_ros respeaker_gencfg.py
-
You will see the updated configuration file at
$(rospack find respeaker_ros)/cfg/Respeaker.cfg.
Yuki Furuta <furushchev@jsk.imi.i.u-tokyo.ac.jp>
