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

Revision history [back]

It doesn't appear to be a conventionally exposed interface for doing so, but if you have a look in stacks/ros_comm/clients/cpp/roscpp/src/libros you'll find param.cpp where ros does it's parameter handling for each node.

In:

   void init(const M_string& remappings)

you'll see that they set up a callback:

   XMLRPCManager::instance()->bind("paramUpdate", paramUpdateCallback);

Which is used to update the local parameter table. You might be able to set up your own callback to do this, but I'm unsure if it would interfere with the node's own parameter updating.

The signature of the callback looks like this btw:

    void callback(XmlRpc::XmlRpcValue& params, XmlRpc::XmlRpcValue& result)

You can look at param.cpp for details on how to use the arguments.

click to hide/show revision 2
add sentence to clarify emulation rather than modification

It doesn't appear to be a conventionally exposed interface for doing so, but if you have a look in stacks/ros_comm/clients/cpp/roscpp/src/libros you'll find param.cpp where ros does it's parameter handling for each node.node. (edit) You can try to emulate what they did.

In:

   void init(const M_string& remappings)

you'll see that they set up a callback:

   XMLRPCManager::instance()->bind("paramUpdate", paramUpdateCallback);

Which is used to update the local parameter table. You might be able to set up your own callback to do this, but I'm unsure if it would interfere with the node's own parameter updating.

The signature of the callback looks like this btw:

    void callback(XmlRpc::XmlRpcValue& params, XmlRpc::XmlRpcValue& result)

You can look at param.cpp for details on how to use the arguments.

click to hide/show revision 3
add "not recommended" clause

It doesn't appear to be a conventionally exposed interface for doing so, and it's probably not a recommended route, but if you have a look in stacks/ros_comm/clients/cpp/roscpp/src/libros you'll find param.cpp where ros does it's parameter handling for each node. (edit) You can try to emulate what they did.

In:

   void init(const M_string& remappings)

you'll see that they set up a callback:

   XMLRPCManager::instance()->bind("paramUpdate", paramUpdateCallback);

Which is used to update the local parameter table. You might be able to set up your own callback to do this, but I'm unsure if it would interfere with the node's own parameter updating.

The signature of the callback looks like this btw:

    void callback(XmlRpc::XmlRpcValue& params, XmlRpc::XmlRpcValue& result)

You can look at param.cpp for details on how to use the arguments.

click to hide/show revision 4
emphasize "not recommended"

It doesn't appear to be a conventionally exposed interface for doing so, and it's probably not a recommended route, route, but if you have a look in stacks/ros_comm/clients/cpp/roscpp/src/libros you'll find param.cpp where ros does it's parameter handling for each node. (edit) You can try to emulate what they did.

In:

   void init(const M_string& remappings)

you'll see that they set up a callback:

   XMLRPCManager::instance()->bind("paramUpdate", paramUpdateCallback);

Which is used to update the local parameter table. You might be able to set up your own callback to do this, but I'm unsure if it would interfere with the node's own parameter updating.

The signature of the callback looks like this btw:

    void callback(XmlRpc::XmlRpcValue& params, XmlRpc::XmlRpcValue& result)

You can look at param.cpp for details on how to use the arguments.