ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

dynamic reconfigure: How explicity fetch data from parameter server?

asked 2013-03-21 01:32:00 -0600

updated 2013-03-29 12:03:59 -0600

I have a dynamic reconfigure server. In my application, eventually an update of the parameter server is done. However these changes are not notified to the dynamic reconfigure server.

I would love to force programatically to the dynamic reconfigure server to fetch again the data from the paramter server. I haven't found any function that do that in the cpp API (I think that there exist something in the python api, but it is not my case). I've also tried to remove the parameter server and later build a new parameter server on the same address. It looks like the master meta-information gets messy and the new parameter server does not appear even if the old is not active anymnore.

Any idea?

edit retag flag offensive close merge delete

Comments

I think you could have a look at the hokuyo node, it uses dynamic reconfigure and may do what you need. You could borrow their code.

Claudio gravatar image Claudio  ( 2013-03-21 02:47:02 -0600 )edit

It is not the case. Hokuyo node uses the dynamic reconfigure in the usual way. It just waits for parameters updates using the topics mechanism used in the dynamic reconfigure server.

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2013-03-27 09:19:31 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2013-03-29 07:45:35 -0600

updated 2013-04-02 00:49:32 -0600

felix k gravatar image

This is the solution. First it is needed to create a clean configuration structure. It has a method to fetch de data from the parameter server explicitly.

ros::NodeHandle nh("/url/configureserver");
dynamic_reconfigure::Server<MyConfig> configure_server(nh);

//some manual modifications of the configure server...

//then we want to fetch the data and call our update callback..

MyConfig current_parameter_server_config;
current_parameter_server_config.__fromServer__(nh);
configure_server.updateConfig(current_parameter_server_config);
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-03-21 01:32:00 -0600

Seen: 1,434 times

Last updated: Apr 02 '13