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

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

gen.add("ground_level", int_t, 0, "Ground level in milimeters", 10,   0, 500)
gen.add("speed",        int_t, 0, "Working speed in mm/s",      50,  0, 500)
gen.add("top_speed",    int_t, 0, "Top speed in mm/s",          62,  0, 500)
gen.add("home_speed",   int_t, 0, "Axis homing speed in mm/s",  21,  0, 500)

gen.add("acceleration", int_t, 0, "Acceleration in mm/s2", 187,  0, 5000)
gen.add("deceleration", int_t, 0, "Deceleration in mm/s2", 187,  0, 5000)

gen.add("probe_depth",  int_t, 0, "Probing depth relative to ground level in mm", 500,  0, 500)

gen.add("dist_per_reading",  int_t, 0, "Distance between force readings in mm", 1,  0, 10)

gen.add("lfd_tolerance",  int_t,    0, "Time for the LFD to triggers a safety stop. 0 ignores the LFD. in ms", 300,  0, 600)


gen.add("max_force",    int_t,    0, "Maximum force in N", 1000,  0, 2000)
gen.add("min_force",    int_t,    0, "Minimum force in N", -1000, -2000, 0)

gen.add("max_force_delta", int_t,  0, "Maximum force increase between readings in N", 1000,  0, 2000)
gen.add("min_force_delta", int_t,  0, "Minimum force increase between readings in N", -1000,    -1500, 0)

gen.add("force_delta_abs", bool_t,   0, "Force delta operates on signed forces (0) or absolute forces (1)",  True)
gen.add("safe_disconnect", bool_t,   0, "Automatically retract probe on communication loss",  False)

#gen.add("double_param", double_t, 0, "A double parameter",    .5, 0,   1)
#gen.add("str_param",    str_t,    0, "A string parameter",  "Hello World")
#

#size_enum = gen.enum([ gen.const("Small",      int_t, 0, "A small constant"),
#                       gen.const("Medium",     int_t, 1, "A medium constant"),
#                       gen.const("Large",      int_t, 2, "A large constant"),
#                       gen.const("ExtraLarge", int_t, 3, "An extra large constant")],
#                     "An enum to set size")
#
#gen.add("size", int_t, 0, "A size parameter which is edited via an enum", 1, 0, 3, edit_method=size_enum)

exit(gen.generate(PACKAGE, "thorvald_penetrometer", "Penetrometer"))
