[Solved] Direction of Arrival with ODAS guide - Not detecting mics

Hi All

I would like to ask about the direction of arrival demo. I tried it and monitor the leds colors and the printed angles.
It gave me wrong directions and it is not stable at all. The values keep changing while having the same voice in the room.
How can I get accurate and stable results?

Thanks in Advance

I want to ask this question, too…

Same responses too…

We recently released a new guide, Direction of Arrival for MATRIX Voice/Creator using ODAS . This guide uses ODAS library for sound source localization and tracking.

I will look into this.

-Yoel

my install cannot find the audio device. This is my terminal command

$ ./matrix-odas & ./odaslive -vc ../config/matrix-demo/matrix_voice.cfg

and this is the output

[1] 2712
+--------------------------------------------+
|    ODAS (Open embeddeD Audition System)    |
+--------------------------------------------+
| Author:  Francois Grondin                  |
| Email:   francois.grondin2@usherbrooke.ca  |
| Website: introlab.3it.usherbrooke.ca       |
| Version: 1.0                               |
+--------------------------------------------+
| + Initializing configurations...... INFO: [/dev/spidev0.0] was opened
Binding socket........... [OK]
Listening socket......... [OK]
Waiting for connection in port 9001 ... [Done] |
| + Initializing objects............. [Done] |
| + Launch threads................... [OK]
Receiving data........... 

[Done] |
| + Threads running.................. ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
Source hops: Cannot open audio device hw:2,0: No such file or directory

aplay -l gives this

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

does this mean the matrix voice creator is not being seen?

I know the matrix voice is ok because it passes the hardware test outlined here:

my output is

$ sudo /usr/share/matrixlabs/matrixio-devices/fpga_info
INFO: [/dev/spidev0.0] was opened
FPGA IDENTIFY = 6032bad2
FPGA VERSION = 1000a

Please, can you share the output of:

sudo dpkg -l | grep matrix
lsmod | grep matrix
arecord -l

Just to make sure, this should be typed in the Pi.

Another thing. These are two different commands:

./matrix-odas &

this would make matrix-odas to run in the background. After this press enter and it’ll take you to back to the prompt ($).

Then do:

./odaslive -vc ../config/matrix-demo/matrix_voice.cfg

$sudo dpkg -l | grep matrix

ii  libmatrixio-creator-hal:armhf         0.3.5                                armhf        Hardware Abstraction Layer for MATRIX.
ii  libmatrixio-creator-hal-dev           0.3.5                                armhf        Hardware Abstraction Layer for MATRIX (headers)
ii  libmatrixio-malos:armhf               0.1.3                                armhf        Libraries of MATRIX abstraction layer for MOS
ii  libmatrixio-protos:armhf              0.1.5                                armhf        Protocolbuffers for MATRIX abstraction layer
ii  libswresample-dev:armhf               7:3.2.10-1~deb9u1+rpt1               armhf        FFmpeg library for audio resampling, rematrixing etc. - development files
ii  libswresample2:armhf                  7:3.2.10-1~deb9u1+rpt1               armhf        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  matrixio-creator-init                 0.4.12                               armhf        Install scripts that can program the MATRIX Creator FPGA and SAM3 IMU.
ii  matrixio-malos                        0.3.5                                armhf        Allows queries to MATRIX Creator hardware via ZMQ.
ii  matrixio-openocd                      1.0.1                                armhf        Open on-chip JTAG debug solution for ARM and MIPS systems
ii  matrixio-protobuf                     3.5.0                                armhf        Protocol Buffers - Google's data interchange format. (From GRPC 3.5.0)
ii  matrixio-xc3sprog                     1.1.1                                armhf        Spartan3, XCF and CPLD JTAG programmer and other utilities.

$ lsmod | grep matrix

GIVES NOTHING

$ arecord -l

**** List of CAPTURE Hardware Devices ****
card 1: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

and yes I get the same error when the commands are entered separately

pi@raspberrypi:~/odas/bin $ ./matrix-odas &

[1] 1822

pi@raspberrypi:~/odas/bin $ INFO: [/dev/spidev0.0] was opened
Binding socket........... [OK]
Listening socket......... [OK]
Waiting for connection in port 9001 ... 

pi@raspberrypi:~/odas/bin $ ./odaslive -vc …/config/matrix-demo/matrix_voice.cfg

+--------------------------------------------+
|    ODAS (Open embeddeD Audition System)    |
+--------------------------------------------+
| Author:  Francois Grondin                  |
| Email:   francois.grondin2@usherbrooke.ca  |
| Website: introlab.3it.usherbrooke.ca       |
| Version: 1.0                               |
+--------------------------------------------+
| + Initializing configurations...... [Done] |
| + Initializing objects............. [Done] |
| + Launch threads................... [OK]
Receiving data........... 

[Done] |
| + Threads running.................. ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
Source hops: Cannot open audio device hw:2,0: No such file or directory
[1]+  Done                    ./matrix-odas
pi@raspberrypi:~/odas/bin $

I am so embarassed and apologize for wasting your time on this. I had not installed the kernel modules

$ lsmod | grep matrix

GIVES NOTHING

I installed the kernel modules and now it works perfectly.

Now all I have to do is understand it. I want to get the azimuth and send that to a servo that turns the head of my robot. My code is written in python. Looking into the ODAS>SRC directory shows me too much information!! 17 other directories ! For example in the connector directory are a bunch of C files. How all these files relate to each other boggles me.

1 Like

Glad to here it works!. The same has happened to me trying to follow a guide too fast wanting to see it running that I skip steps :slight_smile:

Sorry for the semi-resurrection, but this seemed the most suitable place to ask.

The original posting here was asking about the HAL direction-of-arrival demo. While I can get ODAS to work more or less as intended, my understanding is that it is largely a third-party software suite, and thus not actually using the matrix-internal DoA code etc. Instead, it just seems to use the matrix for raw device capture, and the small demo app on top just uses it for led display.

Should I take this to mean that the included DoA capabilities in the HAL code don’t actually work? As mentioned earlier in the thread, the DoA class just outputs constantly-changing, incorrect values.

It seems like most if not all of the promised DSP features don’t actually function properly, which is a rather large disappointment to say the least. Is there some way to get these to behave correctly? Or at least some kind of roadmap for implementing the core features for the platform?

Any update one this 2yrs layer? Would be nice to have the DSP computing the DoA.