Robotics StackExchange | Archived questions

Examples for dynamic_reconfigure in sensors

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 (https://uuvsimulator.github.io/packages/rexrov2/intro/).

The robot also uses a camera, which implements dynamicreconfigure as it is reconfigureable via rqtreconfigure 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 http://wiki.ros.org/Sensors/Cameras. How do they implement dynamic_reconfigure or where / in which files can I find the implementation?

Asked by max3748 on 2019-11-05 09:15:49 UTC

Comments

Answers

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.

Asked by pavel92 on 2019-11-06 05:15:40 UTC

Comments

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 http://wiki.ros.org/dynamic_reconfigure/Tutorials/SettingUpDynamicReconfigureForANode 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.

Asked by max3748 on 2019-11-07 12:19:28 UTC

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

Asked by gvdhoorn on 2019-11-07 12:28:30 UTC