Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions
rosparam_handler.parameter_generator_catkin.ParameterGenerator Class Reference

List of all members.

Public Member Functions

def __init__
def add
def add_enum
def add_group
def generate

Public Attributes

 childs
 classname
 cpp_gen_dir
 dynconfpath
 enums
 group
 group_variable
 nodename
 parameters
 parent
 pkgname
 share_dir

Private Member Functions

def _generate_param_entries
def _generatecfg
def _generatecpp
def _get_parameters
def _perform_checks

Static Private Member Functions

def _get_cvalue
def _get_cvaluedict
def _get_cvaluelist
def _get_pyvalue
def _make_bool
def _pytype
def _test_primitive_type

Detailed Description

Automatic config file and header generator

Definition at line 46 of file parameter_generator_catkin.py.


Constructor & Destructor Documentation

def rosparam_handler.parameter_generator_catkin.ParameterGenerator.__init__ (   self,
  parent = None,
  group = "" 
)
Constructor for ParamGenerator

Definition at line 49 of file parameter_generator_catkin.py.


Member Function Documentation

Generates the entries for the cfg-file
:return: list of param entries as string

Definition at line 472 of file parameter_generator_catkin.py.

Generate .cfg file for dynamic reconfigure
:param self:
:return:

Definition at line 336 of file parameter_generator_catkin.py.

Generate C++ Header file, holding the parameter struct.
:param self:
:return:

Definition at line 364 of file parameter_generator_catkin.py.

Helper function to convert strings and booleans to correct C++ syntax
:param param:
:return: C++ compatible representation

Definition at line 246 of file parameter_generator_catkin.py.

Helper function to convert python dict of strings and booleans to correct C++ syntax
:param param:
:return: C++ compatible representation

Definition at line 295 of file parameter_generator_catkin.py.

Helper function to convert python list of strings and booleans to correct C++ syntax
:param param:
:return: C++ compatible representation

Definition at line 274 of file parameter_generator_catkin.py.

Returns parameter of this and all childs
:return: list of all parameters

Definition at line 462 of file parameter_generator_catkin.py.

Helper function to convert strings and booleans to correct C++ syntax
:param param:
:return: C++ compatible representation

Definition at line 260 of file parameter_generator_catkin.py.

Definition at line 521 of file parameter_generator_catkin.py.

Will test some logical constraints as well as correct types.
Throws Exception in case of error.
:param self:
:param param: Dictionary of one param
:return:

Definition at line 153 of file parameter_generator_catkin.py.

Convert C++ type to python type

Definition at line 229 of file parameter_generator_catkin.py.

Test whether parameter has one of the accepted C++ types
:param name: Parametername
:param drtype: Typestring
:return:

Definition at line 234 of file parameter_generator_catkin.py.

def rosparam_handler.parameter_generator_catkin.ParameterGenerator.add (   self,
  name,
  paramtype,
  description,
  level = 0,
  edit_method = '""',
  default = None,
  min = None,
  max = None,
  configurable = False,
  global_scope = False,
  constant = False 
)
Add parameters to your parameter struct. Call this method from your .params file!

- If no default value is given, you need to specify one in your launch file
- Global parameters, vectors, maps and constant params can not be configurable
- Global parameters, vectors and maps can not have a default, min or max value

:param self:
:param name: The Name of you new parameter
:param paramtype: The C++ type of this parameter. Can be any of ['std::string', 'int', 'bool', 'float',
'double'] or std::vector<...> or std::map<std::string, ...>
:param description: Choose an informative documentation string for this parameter.
:param level: (optional) Passed to dynamic_reconfigure
:param edit_method: (optional) Passed to dynamic_reconfigure
:param default: (optional) default value
:param min: (optional)
:param max: (optional)
:param configurable: (optional) Should this parameter be dynamic configurable
:param global_scope: (optional) If true, parameter is searched in global ('/') namespace instead of private (
'~') ns
:param constant: (optional) If this is true, the parameter will not be fetched from param server,
but the default value is kept.
:return: None

Definition at line 106 of file parameter_generator_catkin.py.

def rosparam_handler.parameter_generator_catkin.ParameterGenerator.add_enum (   self,
  name,
  description,
  entry_strings,
  default = None 
)
Add an enum to dynamic reconfigure
:param name: Name of enum parameter
:param description: Informative documentation string
:param entry_strings: Enum entries, must be strings! (will be numbered with increasing value)
:param default: Default value
:return:

Definition at line 84 of file parameter_generator_catkin.py.

Add a new group in the dynamic reconfigure selection
:param name: name of the new group
:return: a new group object that you can add parameters to

Definition at line 72 of file parameter_generator_catkin.py.

def rosparam_handler.parameter_generator_catkin.ParameterGenerator.generate (   self,
  pkgname,
  nodename,
  classname 
)
Main working Function, call this at the end of your .params file!
:param self:
:param pkgname: Name of the catkin package
:param nodename: Name of the Node that will hold these params
:param classname: This should match your file name, so that cmake will detect changes in config file.
:return: Exit Code

Definition at line 315 of file parameter_generator_catkin.py.


Member Data Documentation

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.

Definition at line 49 of file parameter_generator_catkin.py.


The documentation for this class was generated from the following file:


rosparam_handler
Author(s): Claudio Bandera
autogenerated on Wed Aug 23 2017 02:49:31