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

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

qtc_type_enum = gen.enum([ gen.const("qtcbs",           int_t, 0, "1D QTC_B"),
                           gen.const("qtccs",           int_t, 1, "2D QTC_C"),
                           gen.const("qtcbcs",          int_t, 2, "1D/2D QTC_BC"),
                           gen.const("qtcbcs_argprobd", int_t, 3, "1D/2D QTC_BC using argprobd for transition")],
                         "An enum to set the target qtc type")

gen.add("qtc_type", int_t, 0, "The target QTC type", 1, 0, 3, edit_method=qtc_type_enum)
gen.add("decay_time", double_t, 0, "The time in s after which a human will be discarded.", 120., 0.1, 200)
gen.add("quantisation_factor", double_t, 0, "The quintisation for the creation of 0-satest in m", .1, 0, 10)
gen.add("distance_threshold",  double_t, 0, "The distance threshold for qtcbc transitions in m. Only used for qtcbcs", 1.22, 0, 10)

dist_thresh_enum = gen.enum([ gen.const("intimate_space", int_t, 0, "Halls intimate space: 0.0 - 0.46 m"),
                              gen.const("personal_space", int_t, 1, "Halls personal space: 0.46 - 1.22 m"),
                              gen.const("social_space", int_t, 2, "Halls social space: 1.22 - 3.7 m"),
                              gen.const("public_space", int_t, 3, "Halls public space: 3.7 m and up")],
                           "An enum to set the abstract distance threshold. Only used in qtcbcs_argprobd.")
gen.add("abstract_distance_threshold", int_t, 0, "The abstract distance threshold. Only used in qtcbcs_arbprobd.", 3, 0, 3, edit_method=dist_thresh_enum)

#gen.add("abstract_distance_threshold_mean",  double_t, 0, "The mean of the distance threshold Gaussian. Only used for qtcbc_argprobd", 2.46, 0, 10)
#gen.add("abstract_distance_threshold_stddev",  double_t, 0, "The std dev of the distance threshold Gaussian. Only used for qtcbc_argprobd", 0.62, 0, 10)
gen.add("smoothing_rate",      double_t, 0, "The smoothing rate in s", .3, 0, 10)
gen.add("validate",            bool_t,   0, "Only create valid transtions. Always false if prune_buffer is true.", True)
gen.add("no_collapse",         bool_t,   0, "Do not collapse similar adjacent states. Always false if prune_buffer is true.", False)
gen.add("prune_buffer",        bool_t,   0, "Never keep more than the last element in buffer to reduce load on qsr_lib. ATTENTION: This disables no_collapse and validate!", False)
gen.add("max_buffer_size",     int_t,    0, "The maximum size of the buffer. Ignored if prune_buffer == True", 50, 0, 100)

exit(gen.generate(PACKAGE, "hrsi_representation", "OnlineQTCCreator"))
