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

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

gen.add("grasping_mode",    int_t,    0, "0 - inactive ; 1 - aperture ; 2 - gripper", 0,  0, 2)
gen.add("teleoperation_mode", int_t, 0, "0 - Free Control ; 1 - Force Control", 0, 0, 1)
gen.add("hold_pressure", bool_t, 0, "Select to hold pressure", False)
gen.add("override_pressure", bool_t, 0, "Select to override pressure", True)
gen.add("pressure_manual", int_t, 0, "0 - 80 (placeholder for vision module", 0, 0, 80)

payload_enum = gen.enum([ gen.const("Free_Grasp",int_t, 0, "Free run"),
                       gen.const("Nespresso",     int_t, 1,  "Item 1"),
                       gen.const("LED_Lamp",      int_t, 2, "Item 2"),
                       gen.const("Coke_can",      int_t, 3, "Item 3"),
                       gen.const("Shampoo",     int_t, 4,  "Item 4"),
                       gen.const("Paper_Ball_1",      int_t, 5, "Item 5"),
                       gen.const("Refill_Pack",      int_t, 6, "Item 6"),
                       gen.const("Paper_Ball_2",     int_t, 7,  "Item 7"),
                       gen.const("Coke_bottle",      int_t, 8, "Item 8"),
                       gen.const("Noodles",      int_t, 9, "Item 9"),
                       gen.const("Cereal",   int_t, 10, "Item 10")],
                     "An enum to select payload")

gen.add("payload_select", int_t, 0, "Select payload or free run", 0,0,10, edit_method=payload_enum)

exit(gen.generate(PACKAGE, "grasp_configurator", "Grasp"))
