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

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()
K_scale_enum = gen.enum([ gen.const("scale_tenth", double_t, 0.1, "Scale by 0.1"),
                           gen.const("scale_unity",   double_t, 1.0, "No scaling"),
                           gen.const("scale_ten",  double_t, 10.0, "Scale by 10"),
                           gen.const("scale_hundred", double_t, 100.0, "Scale by 100"),
			   gen.const("scale_thousand", double_t, 1000.0, "Scale by 1000"),
		           gen.const("scale_ten_thousand", double_t, 10000.0, "Scale by 10000")],
                           "Scale factor for K setting")

gen.add("Kp_scale", double_t, 0, "Kp scale", 100, 0.1, 100, edit_method = K_scale_enum)
gen.add("Kp", double_t, 0, "Kp", 0.13, -1, 1)
gen.add("Ki_scale", double_t, 0, "Ki scale", 10, 0.1, 100, edit_method = K_scale_enum)
gen.add("Ki", double_t, 0, "Ki", 0, -1, 1)
gen.add("Kd_scale", double_t, 0, "Kd scale", 10, 0.12, 100, edit_method = K_scale_enum)
gen.add("Kd", double_t, 0, "Kd", 0.18, -1, 1)
gen.add("Stiction_term", double_t, 0, "Constant term added to command", 0.4, -2, 2)
gen.add("Duty_cycle_limit", double_t, 0, "Constant term added to command", 29, 1, 100)

exit(gen.generate(PACKAGE, "legged_robot", "Pid"))
