#!/usr/bin/env python
PACKAGE='goalpost_detector'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

#       Name                       Type       Reconfiguration levexl            Description                       Default   Min   Max
gen.add("gaussian_blur_size",int_t , -1, "Size of Gaussian Blur Kernel (odd value!)", 7, 1, 11)
gen.add("gaussian_blur_sigma",double_t , -1, "Std deviation of Gaussian Blur Kernel", 2, 1, 5)
gen.add("canny_th_low",double_t , -1, "Threshold of the edge detector", 50, 0, 100)
gen.add("canny_th_high",double_t , -1, "Threshold of the edge detector", 50, 50, 200)
gen.add("min_line_length",int_t , -1, "Minimum length of the line", 10, 5, 400)
gen.add("max_line_gap",int_t , -1, "Maximum gap between the lines", 20, 5, 400)
gen.add("hough_accum_th",int_t , -1, "Accumulator threshold to decide line detection", 15, 10, 200)
gen.add("goalpost_h_min",int_t , -1, "Threshold of goalpost H filter", 180, 0, 359)
gen.add("goalpost_h_max",int_t , -1, "Threshold of goalpost H filter", 245, 0, 359)
gen.add("goalpost_s_min",int_t , -1, "Threshold of goalpost S filter", 200, 0, 255)
gen.add("goalpost_s_max",int_t , -1, "Threshold of goalpost S filter", 255, 0, 255)
gen.add("goalpost_v_min",int_t , -1, "Threshold of goalpost V filter", 50, 0, 255)
gen.add("goalpost_v_max",int_t , -1, "Threshold of goalpost V filter", 255, 0, 255)
gen.add("field_filter", bool_t, 0, "filter for field", True)
gen.add("field_h_min",int_t , -1, "Threshold of field H filter", 180, 0, 359)
gen.add("field_h_max",int_t , -1, "Threshold of field H filter", 245, 0, 359)
gen.add("field_s_min",int_t , -1, "Threshold of field S filter", 200, 0, 255)
gen.add("field_s_max",int_t , -1, "Threshold of field S filter", 255, 0, 255)
gen.add("field_v_min",int_t , -1, "Threshold of field V filter", 50, 0, 255)
gen.add("field_v_max",int_t , -1, "Threshold of field V filter", 255, 0, 255)
gen.add("ellipse_size",int_t , -1, "Ellipse size", 2, 1, 9)
gen.add("gain",int_t , -1, "Gain", 255, 0, 255)
gen.add("brightness",int_t , -1, "Brightness", 80, 0, 255)
gen.add("exposure",int_t , -1, "Exposure", 180, 0, 255)
gen.add("debug_image", bool_t, 0, "Show filtered image to debug", True)

exit(gen.generate(PACKAGE, "goalpost_detector_node", "GoalpostDetectorParams"))
