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

Examples for dynamic_reconfigure in sensors

asked 2019-11-05 08:15:49 -0600

max3748 gravatar image

Hello, I am trying to implement dynamic_reconfigure for a chemical sensor which is for instance implemented in the the package of the UUV robot RexRov2 (

The robot also uses a camera, which implements dynamic_reconfigure as it is reconfigureable via rqt_reconfigure and also listed by running rosrun dynamic_reconfigure dynparam list.

My problem is that there are only a few examples / tutorials which show, how a sensor-node can subscribe to the updated data, which is published by the dynamic_reconfigure node.

Therefore I had idea to implement the dynamic reconifguration for the chemical sensor similiar to the already implemented dynamic reconfiguration of RexRov's camera. Unfortunately, I am unable to find the implementation of the dynamic reconfiguration in the RexRov's source file or any camera drivers on How do they implement dynamic_reconfigure or where / in which files can I find the implementation?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-11-06 04:15:40 -0600

pavel92 gravatar image

It does not matter whether dynamic_reconfigure is used in sensor, camera or any other specific ROS package. To get some understanding of how to implement dynamic reconfigure in your package check the dynamic reconfigure tutorials. They give a good step by step tutorial of how to write your .cfg file and set up dynamic reconfigure in your node.

If you want an example of a simple implementation of dynamic reconfigure you can check the pose_follower package where you can find the implementation in the latest commit.

edit flag offensive delete link more


Thanks for your response! I executed the dynamic_reconfigure tutorials before, didn't understand how the actual callback works. The example of pose_follower helped me to understand the callback function better.

In my case, drivers of the sensors are already written and therefore I have no access to insert a parameter-callback-function as in pose_follower. Do you have any idea how to put the updated values to the sensor parameters? For example in the tutorial they create an extra node for reconfiguring but in the configuration-function the parameters are printed out instead of set as the new parameter values.

max3748 gravatar image max3748  ( 2019-11-07 11:19:28 -0600 )edit

If you cannot change the implementation of the driver, you cannot add dynamic_reconfigure support (or at least, not without hacks).

gvdhoorn gravatar image gvdhoorn  ( 2019-11-07 11:28:30 -0600 )edit

Question Tools

1 follower


Asked: 2019-11-05 08:15:49 -0600

Seen: 158 times

Last updated: Nov 06 '19