19 lines
1.2 KiB
Python
19 lines
1.2 KiB
Python
#!/usr/bin/env python
|
|
# Desc: Allows PID parameters and feed forward gain, etc to be tuned in realtime using dynamic reconfigure
|
|
PACKAGE = "hoverboard_driver"
|
|
|
|
from dynamic_reconfigure.parameter_generator_catkin import *
|
|
|
|
gen = ParameterGenerator()
|
|
|
|
# Name Type Level Description Default Min Max
|
|
gen.add( "f" , double_t, 1, "Feed forward gain.", 10.0, -100, 100)
|
|
gen.add( "p" , double_t, 1, "Proportional gain.", 10.0, -100, 100)
|
|
gen.add( "i" , double_t, 1, "Integral gain.", 0.1, -100, 100)
|
|
gen.add( "d" , double_t, 1, "Derivative gain.", 1.0, -100, 100)
|
|
gen.add( "i_clamp_min" , double_t, 1, "Min bounds for the integral windup", -10.0, -100, 0)
|
|
gen.add( "i_clamp_max" , double_t, 1, "Max bounds for the integral windup", 10.0, 0, 100)
|
|
gen.add( "antiwindup" , bool_t, 1, "Antiwindup.", False)
|
|
# PkgName #NodeName #Prefix for generated .h include file, e.g. ParametersConfig.py
|
|
exit(gen.generate(PACKAGE, "hoverboard_driver", "Hoverboard"))
|