O'Reilly logo

Robot Operating System Cookbook by Kumar Bipin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it…

  1. To use the Dynamic Reconfigure utility, we will write a configuration file and save it in the cfg folder in the intended package.
  2. Create the cfg folder and a parameter_server_tutorials.cfg file there in the parameter_server_tutorials package, as follows:
$ roscd parameter_server_tutorials 
$ mkdir cfg 
$ vim parameter_server_tutorials 
  1. We will add the following code in the parameter_server_tutorials.cfg file:
#!/usr/bin/env python PACKAGE = "parameter_server_tutorials" from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() gen.add("BOOL_PARAM", bool_t, 0,"A Boolean parameter", True) gen.add("INT_PARAM", int_t, 0, "An Integer Parameter", 1, 0, 100) gen.add("DOUBLE_PARAM", double_t, 0, "A Double ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required