#!/usr/bin/env python
PACKAGE = "ping_pong_follower"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

group1 = gen.add_group("HSV thresholding", state = True)
group1.add("low_H_param"   ,    int_t,    0, "Low H", 8,  0, 255)
group1.add("high_H_param"  ,    int_t,    0, "High H", 105,  0, 255)

group1.add("low_S_param"   ,    int_t,    0, "Low S", 113,  0, 255)
group1.add("high_S_param"  ,    int_t,    0, "High S", 255,  0, 255)

group1.add("low_V_param"   ,    int_t,    0, "Low V", 189,  0, 255)
group1.add("high_V_param"  ,    int_t,    0, "High V", 255,  0, 255)


group2 = gen.add_group("Blob Detection", state = True)
#Area
group2.add("filterByArea",     bool_t,   0, "filterByArea",  True)
group2.add("minArea",          int_t,    0, "minArea", 50,  0, 50*50)

#Circularity
group2.add("filterByCircularity",   bool_t,    0, "filter By Circularityr",  True)
group2.add("minCircularity",       double_t,    0, "min Circularity", 0.1,  0, 1)

#Convexity
group2.add("filterByConvexity",   bool_t,   0, "filter By Convexity",  True)
group2.add("minConvexity",    double_t,    0, "min Convexity", 0.87,  0, 1)

#Inertia
group2.add("filterByInertia",   bool_t,   0, "filter By Inertia",  True)
group2.add("minInertiaRatio",    double_t,    0, "minInertiaRatio", 0.01,  0, 100)

exit(gen.generate(PACKAGE, "ping_pong_follower", "HSVandBlob"))
