#! /usr/bin/env python
# VFH Planner configuration

PACKAGE='vfh_local_planner'
import roslib; roslib.load_manifest(PACKAGE)

import sys

from dynamic_reconfigure.parameter_generator import *

gen = ParameterGenerator()

#       Name       Type      Reconfiguration level Description     Default Min   Max
gen.add("m_safety_dist_0ms", double_t, 0, "The minimum distance the robot is allowed to get to obstacles when stopped", 100)
gen.add("m_safety_dist_1ms", double_t, 0, "The minimum distance the robot is allowed to get to obstacles when stopped", 100)
gen.add("m_max_speed", double_t, 0, "The maximum allowable speed of the robot", 200)
gen.add("m_max_speed_narrow_opening", double_t, 0, "The maximum allowable speed of the robot through a narrow opening", 200)
gen.add("m_max_speed_wide_opening", double_t, 0, "The maximum allowable speed of the robot through a wide opening", 300)
gen.add("m_max_acceleration" , double_t, 0, "The maximum allowable acceleration of the robot.", 200)
gen.add("m_min_turnrate" ,  double_t, 0, "The minimum allowable turnrate of the robot.", 40)
gen.add("m_max_turnrate_0ms" ,  double_t, 0, "The maximum allowable turnrate of the robot when stopped.", 40)
gen.add("m_max_turnrate_1ms" , double_t, 0, "The maximum allowable turnrate of the robot when travelling 1 m/s.", 40)
gen.add("m_free_space_cutoff_0ms" , double_t, 0, "The higher the value, the closer the robot will get to obstacles before avoiding (while stopped).", 2000000)
gen.add("m_free_space_cutoff_1ms" , double_t, 0, "The higher the value, the closer the robot will get to obstacles before avoiding (when travelling 1 m/s.).", 2000000)
gen.add("m_obs_cutoff_0ms" , double_t, 0, "histogram threshold", 4000000)
gen.add("m_obs_cutoff_1ms" , double_t, 0, "histogram threshold", 4000000)
gen.add("m_weight_desired_dir" , double_t, 0, "Bias for the robot to turn to move toward goal position.", 5.0)
gen.add("m_weight_current_dir" , double_t, 0, "Bias for the robot to continue moving in current direction of travel", 1.0)
gen.add("m_robot_radius" , double_t, 0, "robot radius, 300")

gen.add("restore_defaults",  bool_t, 0, "Retore to the default configuration", False)

exit(gen.generate(PACKAGE, "vfh_local_planner", "VFHPlanner"))
