#!/usr/bin/env python3
# NOTE: Config for changing the joint efforts.
PACKAGE = "panda_gazebo"

from dynamic_reconfigure.parameter_generator_catkin import (ParameterGenerator,
                                                            double_t)

gen = ParameterGenerator()

# Generate arm effort control parameters.
arm = gen.add_group("arm")
arm.add("joint1_effort", double_t, 0, "Joint 1 effort control command", 0, -87.0, 87.0)
arm.add("joint2_effort", double_t, 1, "Joint 2 effort control command", 0, -87.0, 87.0)
arm.add("joint3_effort", double_t, 2, "Joint 3 effort control command", 0, -87.0, 87.0)
arm.add("joint4_effort", double_t, 3, "Joint 4 effort control command", 0, -87.0, 87.0)
arm.add("joint5_effort", double_t, 4, "Joint 5 effort control command", 0, -12.0, 12.0)
arm.add("joint6_effort", double_t, 5, "Joint 6 effort control command", 0, -12.0, 12.0)
arm.add("joint7_effort", double_t, 6, "Joint 7 effort control command", 0, -12.0, 12.0)

# Generate hand effort control parameters.
hand = gen.add_group("hand")
hand.add(
    "width",
    double_t,
    7,
    "Gripper width",
    0,
    0.0,
    0.08,
)
hand.add(
    "speed",
    double_t,
    8,
    "Gripper speed",
    0.2,
    0.0,
    0.2,
)

# Generate the necessary files and exit the program.
exit(gen.generate(PACKAGE, "panda_test", "JointEffort"))
