Application for LocalizeMUSIC with dynamic reconfigure

Overview

  • Parameters for sound source localization (LocalizeMUSIC and SourceTracker) are dynamically reconfigured.
  • HARK dynamic reconfigure module (RosHarkParamsDynReconf) subscribes the GUI reconfigure.
  • RosHarkParamsDynReconf sends the most recent parameters to LocalizeMUSIC and SourceTracker.

 

 Main Sheet Configuration

  • Required Modules
    • RosNodeGenerator
    • Constant
    • InputStream
    • MAIN_LOOP (Same as LOOP0 in the previous tutorials. This appears after you create iterator sheet.)

 

RosNodeGenerator

All description is available at Publishing/Subscribing msg type Topics.

 

Constant

All description is available at Application of publishing/subscribing HARK std messages.

 

InputStream

All description is available at Application of publishing/subscribing HARK std messages.

 

MAIN_LOOP

All description is available at Application of publishing/subscribing HARK std messages.

 

 Iterator Sheet Configuration

  • Required Modules
    • AudioStreamFromWave
    • MultiFFT
    • LocalizeMUSIC
    • SourceTracker
    • DisplayLocalization
    • RosHarkParamsDynReconf

 

AudioStreamFromWave

All description is available at Application of publishing/subscribing HARK std messages.

 

MultiFFT

All description is available at Application of publishing/subscribing HARK std messages.

 

LocalizeMUSIC

All description is available at Application of publishing/subscribing HARK std messages.

 

SourceTracker

All description is available at Application of publishing/subscribing HARK std messages.

 

DisplayLocalization

All description is available at Application of publishing/subscribing HARK std messages.

 

RosHarkParamsDynReconf

  • Module Description

This module subscribes all reconfigurable HARK parameters from ROS dynamic reconfigure parameter server.

This module outputs the most recent subscribed HARK parameters.

 

  • Module Location
Node list > HARK:ROS:Utility > RosHarkParamsDynReconf

 

  • Property settings
Name Type Value Explanation
ROS_DURATION float 0.001 Minimum interval of ROS topic subscription
ENABLE_DEBUG bool false Pring debug message or not

 

ROS_DURATION is only valid if the ROS_DURATION is longer than HARK interval.

Set ROS_DURATION small value so that HARK can work with desired interval.

 

  • Reconfigurable Parameters
Module Name Property Name
LocalizeMUSIC NUM_SOURCE
LocalizeMUSIC MIN_DEG
LocalizeMUSIC MAX_DEG
LocalizeMUSIC LOWER_BOUND_FREQUENCY
LocalizeMUSIC UPPER_BOUND_FREQUENCY
SourceTracker THRESH
SourceTracker PAUSE_LENGTH
SourceTracker MIN_SRC_INTERVAL
HRLE LX
HRLE TIME_CONSTANT

 

 Enabling Hidden Input Terminals

In the above figure, “LocalizeMUSIC” and “SourceTracker” have “PARAMS” input terminals.

Originally, both modules don’t have “PARAMS” input terminals.

Actually, both modules have “PARAMS” as “hidden” input terminals , and the dynamic reconfigure function uses the hidden terminals.

This section describes how to add hidden terminals.

First, right click this node.

Click “Add Input” in the popup menu,

Add “PARAMS” in the Name form, then press “Add”.

You will see like following.

Do the same thing for the SourceTracker.

 

 Examining the network file

Save the network file before closing [e.g.) LocalizeMUSIC_with_HarkMsgsDynReconf.n ]

Open a new terminal and type

roscore

 

Prepare one recorded wave file for the evaluation (YOUR_WAV.wav).

Go back to the previous terminal and run the HARK network file

./LocalizeMUSIC_with_HarkMsgsDynReconf.n YOUR_WAV.wav

 

Open a new terminal and type

rosrun rqt_reconfigure rqt_reconfigure

 

You’ll see a reconfigure GUI.

You can modify parameters of LocalizeMUSIC and SourceTracker through this dynamic reconfigure GUI.

Now, let us check how the ROS system sees the HARK network by rqt_graph.

rosrun rqt_graph rqt_graph

 

You can see that the HARK_MASTER_NODE node accesses the dynamic reconfigure parameter server.

Also

rostopic list

returns

/HARK_MASTER_NODE/parameter_descriptions
/HARK_MASTER_NODE/parameter_updates
/rosout
/rosout_agg

Back to Top