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

Retrieve "current configuration" from dynamic reconfigurable node

asked 2012-06-08 03:16:42 -0600

Random-I-Am gravatar image

updated 2014-01-28 17:12:36 -0600

ngrennan gravatar image

Lets say I just created a piece of software which is capable of sending dynamic_reconfigure configs towards the /move_base/local_costmap/set_parameter server.

The only way to send a configuration is to send the whole configuration and therefore one needs to send the values of each member of the configuration object. Since my design allows for manipulating only single or few parameters I need to retrieve the current values of all the other members so they are not set to their datatypes default values.

What I found so far is the following:

  • Use the response of the dynamic_reconfigure call (won't help, since that leads to the same problem of creating the first configuration which I would send to get the response)
  • Various topics including /move_base/local_costmap/parameter_(descriptions||update) (won't help for the same reason)

Obviously, my question now is how to get a configuration object holding the current values of the server.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-06-08 10:30:04 -0600

You can do this via 2 methods:

  • If you are using python, you can simply use the dynamic reconfigure API to get the current configuration
  • You can use the /move_base/local_costmap/parameter_updates topic. Since this is a latched topic, whenever you subscribe to this topic - you will receive one message which contains the current configuration. You should receive this message independent of whether a new configuration has been posted to the server or not.
edit flag offensive delete link more

Comments

I tried the second approach before but couldn't get the subscriber to work (for whatever reasons). I did it again and it seems to work now. A different approach seems to send a Reconfigure object with an empty request. The response will then contain the current configuration as a response. Feedback?

Random-I-Am gravatar image Random-I-Am  ( 2012-06-10 23:27:53 -0600 )edit
0

answered 2013-04-09 23:25:57 -0600

Philip gravatar image

While this question is quite old, I'd like to add one piece of information which I had been searching for myself :-)

As joq pointed out in a comment to his answer here, dynamic_reconfigure actually updates the parameter server with the current values. So the easiest way to get the current configuration is to query it from parameter server.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-06-08 03:16:42 -0600

Seen: 651 times

Last updated: Apr 09 '13