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

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

# Explain ParameterGenerator.add
# gen.add(name, type, level, description, default = None, min = None, max = None)
# - name: a string which specifies the name under which this parameter should be stored
# - type: defines the type of value stored, and can be any of int_t, double_t, str_t, or bool_t
# - level: A bitmask which will later be passed to the dynamic reconfigure callback. When the callback is called all of the level values for parameters that have been changed are ORed together and the resulting value is passed to the callback.
# - description: string which describes the parameter
# - default: specifies the default value
# - min: specifies the min value (optional and does not apply to strings and bools)
# - max: specifies the max value (optional and does not apply to strings and bools)

#list of parameters
#Synchronize with agvlib.h in agv_main pkg
gen.add('L', double_t, 0, "Distance (m) between two wheels", 0.5, 0, 1)
gen.add('R', double_t, 0, "Wheel radius (m)", 0.085, 0, 1)
gen.add('K', int_t, 0, "He so banh rang dong co", 30, 0, 500)
gen.add('SpeedMotorMax', double_t, 0, "Speed maximum of moter before gear", 4000, 100, 8000)
gen.add('SpeedMotorMin', double_t, 0, "Speed minimum of moter before gear", 80, 0, 1000)
gen.add('THRESHOLD_QUALITY_POSE', int_t, 0, "Threshold of quality pose allow to run Navigation", 60, 0, 100)
gen.add('CHARGER_TIME_OUT', int_t, 0, "Timeout for action Charging", 300, 0, 1000)
gen.add('NOD_POSE_TIME_OUT', int_t, 0, "Timeout for action Nod with position", 3, 0, 30)
gen.add('NOD_HEAD_TIME_OUT', int_t, 0, "Timeout for action Nod the head", 300, 0, 1000)

exit(gen.generate(PACKAGE, "agv_define", "robot"))