Dynamic reconfigure of gmapping parameters

Hello all,

I'd like to change the gmapping parameters namely xmin, ymin, xmax, ymax dynamically. My first thought was to use the dynamic_reconfigure package, but it seemed that it requires changing the source code of the gmapping.

My second thought was to use system calls from a different node to execute:

system("rosnode kill slam_gmapping");

system("rosrun gmapping slam_gmapping xmin:=foo ymin:=bra xmax:=foo ymax:=bra &")

However, it seemed that the new gmapping process blocks the node from which the system calls were executed. Please note that I appended the ampersand in the end of the line, but it didn't help. Anyways, using system calls doesn't sound to be a very good way.

What would be the common way to do this?