#!/usr/bin/env python
"""
Add your desired parameters here. All required headers will be generated from this.
!!!IMPORTANT this file must be executable !!!

Use one of these commands to add parameters to your parameter struct.

 def add(self, name, paramtype, description, level=0, edit_method='""', default=None, min=None, max=None, configurable=False, global_scope=False, constant=False):
        Adds parameters to your parameter struct.

        - 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

 def add_enum(self, name, description, entry_strings, default=None):
        Adds 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:

"""
from mrt_cmake_modules.parameter_generator_catkin import *

gen = ParameterGenerator()

# ROS-specific
gen.add("msg_queue_size", paramtype='int', description="Queusize for publisher", default=5, min=1)
gen.add("verbosity", paramtype='std::string', description="Set logger level for this node", default="info")
gen.add("topic_publisher", paramtype='std::string', description="Image publisher topic name", default="/image_out")
gen.add("motor_command_topic", paramtype='std::string', description="MotorCommand topic name", default="motor_command")
gen.add("servo_command_topic", paramtype='std::string', description="ServoCommand topic name", default="servo_command")
gen.add("topic_subscriber", paramtype='std::string', description="Image subscriber topic name", default="/image_in")

gen.add("threshold", paramtype='int', description="Number of pixels to assume detected pylon", default=350, min=0, max=5000, configurable=True, global_scope=False)
gen.add("h_min", paramtype='int', description="Minimum hue value", default=0, min=0, max=255, configurable=True, global_scope=False)
gen.add("h_max", paramtype='int', description="Maximum hue value", default=5, min=0, max=255, configurable=True, global_scope=False)
gen.add("s_min", paramtype='int', description="Minimum saturation value", default=150, min=0, max=255, configurable=True, global_scope=False)
gen.add("s_max", paramtype='int', description="Maximum saturation value", default=255, min=0, max=255, configurable=True, global_scope=False)
gen.add("v_min", paramtype='int', description="Minimum value value", default=50, min=0, max=255, configurable=True, global_scope=False)
gen.add("v_max", paramtype='int', description="Maximum value value", default=255, min=0, max=255, configurable=True, global_scope=False)
gen.add("median_blur_kernel_size", paramtype='int', description="Maximum value value", default=3, min=1, max=50, configurable=True, global_scope=False)

# DO NOT TOUCH THIS LINE
#Syntax : Package, Node, Config Name(The final name will be PylonDetectorConfig)
exit(gen.generate("demo_image_processing_ros_tool", "pylon_detector", "PylonDetector"))
