Coder Social home page Coder Social logo

balkce / beamform Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 6.0 122 KB

ROS package that carries out simple beamforming strategies, using JACK as input/output audio server.

License: GNU General Public License v3.0

CMake 2.01% Python 12.04% C++ 85.95%

beamform's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

beamform's Issues

How to verfiy if the beamforming node is interfaced with proper mic? and Is it possible to get the raw audio file of individual channel?

Hey,

I would like to use this package for XMOS 7 array Microphone. But, when I launched das.launch, I got some error, so I did jack_control start (to start jack server) and usermod -a -G audio <theusername> (to avoid cannot allocate memory: permission denied)

Now, I get:

... logging to /home/ajay/.ros/log/1332ee66-4f2f-11ea-990f-708bcda03968/roslaunch-ajay-5744.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ajay:38401/

SUMMARY
========

PARAMETERS
 * /beamform/angle_interf10: 181.0
 * /beamform/angle_interf11: 181.0
 * /beamform/angle_interf12: 181.0
 * /beamform/angle_interf13: 181.0
 * /beamform/angle_interf14: 181.0
 * /beamform/angle_interf15: 181.0
 * /beamform/angle_interf1: 90.0
 * /beamform/angle_interf2: 181.0
 * /beamform/angle_interf3: 181.0
 * /beamform/angle_interf4: 181.0
 * /beamform/angle_interf5: 181.0
 * /beamform/angle_interf6: 181.0
 * /beamform/angle_interf7: 181.0
 * /beamform/angle_interf8: 181.0
 * /beamform/angle_interf9: 181.0
 * /beamform/auto_connect: True
 * /beamform/initial_angle: 0.0
 * /beamform/mic0/id: 0
 * /beamform/mic0/x: 0.0
 * /beamform/mic0/y: 0.0
 * /beamform/mic0/z: 0.0
 * /beamform/mic1/id: 1
 * /beamform/mic1/x: -0.0225
 * /beamform/mic1/y: 0.03897
 * /beamform/mic1/z: 0.0
 * /beamform/mic2/id: 2
 * /beamform/mic2/x: -0.045
 * /beamform/mic2/y: 0.0
 * /beamform/mic2/z: 0.0
 * /beamform/mic3/id: 3
 * /beamform/mic3/x: -0.0225
 * /beamform/mic3/y: -0.03897
 * /beamform/mic3/z: 0.0
 * /beamform/mic4/id: 4
 * /beamform/mic4/x: 0.0225
 * /beamform/mic4/y: -0.03897
 * /beamform/mic4/z: 0.0
 * /beamform/mic5/id: 5
 * /beamform/mic5/x: 0.045
 * /beamform/mic5/y: 0.0
 * /beamform/mic5/z: 0.0
 * /beamform/mic6/id: 6
 * /beamform/mic6/x: 0.0225
 * /beamform/mic6/y: 0.03897
 * /beamform/mic6/z: 0.0
 * /beamform/output_type: 0
 * /beamform/ros_output_sample_rate: 48000
 * /beamform/verbose: True
 * /beamform/write_file: True
 * /beamform/write_file_path: 
 * /beamform/write_xrun: False
 * /rosdistro: melodic
 * /rosversion: 1.14.3

NODES
  /
    beamform (beamform/das)

auto-starting new master
process[master]: started with pid [5754]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 1332ee66-4f2f-11ea-990f-708bcda03968
process[rosout-1]: started with pid [5765]
started core service [/rosout]
process[beamform-2]: started with pid [5772]
ROS Node name: /beamform
Beamform ROS parameters: 
[ INFO] [1581687419.939918129]: Verbose: 1
[ INFO] [1581687419.940771589]: Initial angle: 0.000000
[ INFO] [1581687419.941067242]: Mic 0: (0.000000,0.000000) (0.000000,0.000000)
[ INFO] [1581687419.941415528]: Mic 1: (-0.022500,0.038970) (0.044999,120.000728)
[ INFO] [1581687419.941708336]: Mic 2: (-0.045000,0.000000) (0.045000,180.000000)
[ INFO] [1581687419.942016271]: Mic 3: (-0.022500,-0.038970) (0.044999,-120.000728)
[ INFO] [1581687419.942293886]: Mic 4: (0.022500,-0.038970) (0.044999,-59.999272)
[ INFO] [1581687419.942667764]: Mic 5: (0.045000,0.000000) (0.045000,0.000000)
[ INFO] [1581687419.942910259]: Mic 6: (0.022500,0.038970) (0.044999,59.999272)
[ INFO] [1581687419.943291710]: Interference 1 at: 90.000000
[ INFO] [1581687419.943517512]: Number of microphones: 7
Coordinates of microphones, relative to Mic0: 
Mic #0
	 x: 0
	 y: 0
	 d: 0
	 a: 0
Mic #1
	 x: -0.0225
	 y: 0.03897
	 d: 0.044999
	 a: 120.001
Mic #2
	 x: -0.045
	 y: 0
	 d: 0.045
	 a: 180
Mic #3
	 x: -0.0225
	 y: -0.03897
	 d: 0.044999
	 a: -120.001
Mic #4
	 x: 0.0225
	 y: -0.03897
	 d: 0.044999
	 a: -59.9993
Mic #5
	 x: 0.045
	 y: 0
	 d: 0.045
	 a: 0
Mic #6
	 x: 0.0225
	 y: 0.03897
	 d: 0.044999
	 a: 59.9993

JACK ROS parameters: /beamform
[ INFO] [1581687419.945915432]: Output type: ROSJACK_OUT_BOTH
[ INFO] [1581687419.946164005]: Auto connect: 1
[ INFO] [1581687419.946401290]: Write output to audio file: 1
[ WARN] [1581687419.946630759]: Audio file path argument found in ROS param server is empty, using default value (/home/ajay/rosjack_write_file.wav).
[ INFO] [1581687419.946855756]: Write XRUN count to file: 0
[ INFO] [1581687419.947067210]: ROS Output Sample Rate: 48000
Connecting to Jack Server...
JACK window size: 1024
JACK sample rate: 48000
ROS Output Sample Rate and JACK sample rate are the same. Not creating sample rate converter.
Writing ROS output in: /home/ajay/rosjack_write_file.wav
Audio file info:
	Sample Rate: 48000
	Channels: 1
	Format: WAV, PCM 16-bit
Agent activated.
jack_connect called with a NULL port name
Connecting input ports... Cannot connect input port beamform:input_3.
[ WARN] [1581687419.983749097]: Not connecting any more input ports, sticking with the ones that were connected.

done.
Pre-allocating space for internal buffers.
Overlap Info:
	 Start index of first window: 2560
	 Start index of last window : 512
New delays:
	 0 -> 0.000000
	 1 -> 0.000066
	 2 -> 0.000131
	 3 -> 0.000066
	 4 -> -0.000066
	 5 -> -0.000131
	 6 -> -0.000066
[ INFO] [1581687420.234596693]: Beamform ROS node started.

I wonder is there any tutorial for this package? Because, I'm not sure on how to interface with the proper mic and to verify if its working.The beamform node seems to run even when i disconnect the mic. I think, it has not selected the appropriate mic. How to do it ? and what does auto_connect: false do? and what does d and a means in Mic #0, Mic #1, etc.. ?

Finally, Is there anyway to get the raw audio data from each of the channels separately?

Other additional info:

cat /proc/asound/cards

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7230000 irq 37
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf7080000 irq 17
 2 [UAC20          ]: USB-Audio - XMOS Microphone Array UAC2.0
                      XMOS XMOS Microphone Array UAC2.0 at usb-0000:00:14.0-5, full speed

arecord -l

**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1150 Analog [ALC1150 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC1150 Alt Analog [ALC1150 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: UAC20 [XMOS Microphone Array UAC2.0], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.