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

Revision history [back]

I don't think there is much of a standard around this, because most robots don't have run-time reconfigurable cameras (the resolution is often encoded in the launch file). dynamic_reconfigure is probably the most popular approach although most of the time it is used for parameters like white balance. One example is the Intel Realsense drivers.

I'd generally avoid "standard parameters" for this, since you probably want the feedback that things have changed. I'd suggest there are 4 possible ways which would all be "ROS-like":

  • ROS Service -- probably the simplest and most straight forward, you definitely get a response that things have completed. In general, services are a good idea if the service will return almost immediately. If it is a longer running operation, you might want to look at:
  • ROS Actions -- this is like a service, but implements a full state machine over several topics. It can be interrupted (unlike a service). The code complexity will be a bit higher than a service.
  • Dynamic reconfigure -- if you want to be able to use GUI tools like rqt_reconfigure, this might be the best option. The downside I could see with this approach is that you could get "partial changes" after you change each parameter with a tool like rqt_reconfigure. You might have to encode a lot of logic to handle that, to avoid sending bad updates down.
  • image_pipeline - if you have several "standard" configurations, this might be a possible approach. This is commonly found on a lot of robots which have a fixed camera resolution but want to offer downsampled versions for certain operations (e.g. inserting into a costmap). The image_pipeline package has a number of nodes/nodelets that can sample/convert your images. The upside is that there is no "switching" cost, the downside is that more processing might take place (although lazy subscribers can help here, as I believe all of the image_pipeline nodes/nodelets will stop doing work if they have no subscribers).