Ask Your Question
0

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

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 http://wiki.ros.org/Sensors/Cameras. 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
0

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

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.

max3748 gravatar imagemax3748 ( 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 imagegvdhoorn ( 2019-11-07 11:28:30 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 17 times

Last updated: Nov 06