# Can we load dynamic_reconfigure parameters directly from Parameter Server?

Hi All,

I need to load parameters from dynamic_reconfigure, however, in the callback() function for dynamic_reconfigure my program does not know the parameter names, instead, what I am doing is to load all the parameters on a specific topic directly from parameter server. A code snippet is included below to give an idea of what my code looks.

The problem I am encountering is that instead of loading the latest value from rqt Dynamic Reconfigure GUI, my program loads the last value displayed.

Can anyone help with this problem. Apparently, it seems like parameter server gets updated after the call to the dynamic_reconfigure:Server<> Callback() is finished. I've tried delaying the callback thread just to see if there is a delay in update to parameter server, but it didn't help.

ros::NodeHandle nodeHandle;
std::string handleKey = nodeHandle.getNamespace() + "/node_name/parameters"

// Dynamic Reconfigure Server Callback()
void Callback(SomeVariableTypeConfig &,  uint32_t /*level*/) {

XmlRpc::XmlRpcValue configList;
nodeHandle.getParam(handleKey, configList);

std::map<std::string, XmlRpc::XmlRpcValue>::iterator j;
for (j = configList.begin(); j != configList.end(); ++j)
{