Ask Your Question
0

Can global parameters be used with dynamic_reconfigure?

asked 2017-08-09 08:34:43 -0500

dieg0- gravatar image

Hi everyone, when using dynamic_reconfigure, the parameters used are linked to specific nodes. For example, if there is a cfg/MyConfig.cfg file with a parameter such as gen.add('my_param', int_t,....), and this runs in node my_node, then the parameter server will have a parameter such as /my_node/my_param. Is it possible to have instead a global parameter /my_param?

Moreover, would it be possible to use that single cfg file for two (or more) nodes? That is, upon modifications of /my_param, a node, eg. my_node_1 should call certain callback cbk_1, and my_node_2 should call certain callback cbk_2.

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-09 09:09:42 -0500

lucasw gravatar image

I made a script https://github.com/lucasw/dynamic_rec... that creates a dynamic reconfigure server out of specified elements of other dr servers.

In this example https://github.com/lucasw/vimjay/blob... there is a a control 'capture_single' and another control 'WhiteBalanceTemperature' on two different dr servers, but running dr2dr creates a new control panel with those two (and many other controls on those two servers excluded):

# [server name, server value name, type, level, description, default value, min, max]
capture_single: ["/usb_cam/image_deque", "capture_single", "bool", 1, "capture single image", False, False, True]
white_balance_temperature: ["/usb_cam/v4l2ucp_ddr", "WhiteBalanceTemperature", "int", 2, "Change camera white balance", 5000, 2800, 6500]

(I haven't tested dr2dr recently so possibly it needs some cleanup)

It wouldn't be too hard to make it support 1-to-many controls rather than just 1-to-1: you would be able to change parameters in many other dr servers from one master parameter, and changing any of those individual parameters could also get reflected across the rest.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-08-09 08:34:43 -0500

Seen: 86 times

Last updated: Aug 09 '17