#! /usr/bin/env python

PACKAGE='htp_auto'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()
#       Name       Type      Level Description     Default Min   Max
gen.add("travel_vel", double_t,  0, "Forward velocity between waypoints (m/s)", .25, 0, 1.0)

gen.add("line_following_mode", bool_t, 0, "If true then commands lateral error to zero.", False)

gen.add("projection_distance", double_t, 0, "How far (meters) to control in front of CoR when line following.", .5, 0, 10)

gen.add("max_heading_error_deg", double_t, 0, "Max heading error (degrees) when traveling before stopping and re-facing target.", 75, 5, 180)

gen.add("heading_kp", double_t,    0,    "Propertional gain.",   4,    0,  100)
gen.add("heading_ki", double_t,    0,    "Integral gain.",       0.8,  0,  100)
gen.add("heading_kd", double_t,    0,    "Derivative gain.",     0,    0,  100)

gen.add("heading_sat",     double_t,  0,  "Maximum angular velocity (rad/sec).",  1.0,  0,  6)
gen.add("heading_int_sat", double_t,  0,  "Maximum integral sum (rad/sec).",  0.5,  0,  6)

gen.add("heading_pub_prescaler", int_t, 0,  "Scales down publish rate. -1 to disable.", 5, -1, 100)

gen.add("lateral_kp", double_t,    0,    "Propertional gain.",   1,    0,  100)
gen.add("lateral_ki", double_t,    0,    "Integral gain.",       0,    0,  100)
gen.add("lateral_kd", double_t,    0,    "Derivative gain.",     0,    0,  100)

gen.add("lateral_sat",     double_t,  0,  "Maximum angular velocity (rad/sec).",  1.0,  0,  6)
gen.add("lateral_int_sat", double_t,  0,  "Maximum integral sum (rad/sec).",  0.5,  0,  6)

gen.add("lateral_pub_prescaler", int_t, 0,  "Scales down publish rate. -1 to disable.", 5, -1, 100)

exit(gen.generate(PACKAGE, "waypoint_guidance", "GuidanceParams"))
