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

from dynamic_reconfigure.parameter_generator_catkin import *
import numpy as np

gen = ParameterGenerator()

gen.add("delta_angular_vel", double_t, 0, "sampling resolution of angular velocity", 0.05, 0, np.pi)
gen.add("lim_angular_vel", double_t, 0, "limitation of angular velocity", 0.1, 0, np.pi)
gen.add("lim_angular_acc", double_t, 0, "limitation of angular acceralation", 0.4, 0, np.pi)
gen.add("delta_linear_vel", double_t, 0, "sampling resolution of linear velocity", 0.1, 0, 3.0)
gen.add("lim_linear_vel", double_t, 0, "limitation of linear velocity", 0.5, 0, 3.0)
gen.add("lim_linear_acc", double_t, 0, "limitation of linear acceralation", 0.2, 0, 1.0)

gen.add("sampling_time", double_t, 0, "sampling time of physics model", 0.5, 0, 1.0)
gen.add("num_prediction_steps", int_t, 0, "number of prediction steps of physics model", 10, 3, 200)

gen.add("robot_width", double_t, 0, "the width of the robot model", 3.2, 0, 5.0)
gen.add("robot_length", double_t, 0, "the length of the robot model", 5.8, 3, 8.0)
gen.add("simplify_distance", double_t, 0, "the simplify distance of robot polygon", 0.05, 0.0, 10.0)

gen.add("weight_grid_map", double_t, 0, "weight of the grid map cost", 0.0, 0.0, 1.0)
gen.add("weight_velocity", double_t, 0, "weight of the velocity", 0.0, 0.0, 1.0)
gen.add("weight_heading", double_t, 0, "weight of the heading angle", 0.0, 0.0, 1.0)
gen.add("weight_goal_distance", double_t, 0, "weight of the goal pose distance", 1.0, 0.0, 1.0)

exit(gen.generate(PACKAGE, "dwa_planner", "DwaPlanner"))