#!/usr/bin/env python
"""
Add your desired parameters here. All required headers will be generated from this.
!!!IMPORTANT this file must be executable !!!

Use one of these commands to add parameters to your parameter struct:

def add(self, name, paramtype, description, level=0, edit_method='""', default=None, min=None, max=None, configurable=False, global_scope=False, constant=False):
        Adds parameters to your parameter struct.

def add_enum(self, name, description, entry_strings, default=None, paramtype='int'):
        Adds an enum to dynamic reconfigure

def add_group(self, name):
        Create a parameter group for the dynamic_reconfigure window

def add_publisher(self, name, message_type, description, default_topic="", default_queue_size=5, topic_param=None,
                  queue_size_param=None, header=None, module=None, configurable=False, scope='private',
                  constant=False):
        Adds an initialized publisher to your parameter struct and parameter for its topic and queue size

def add_subscriber(self, name, message_type, description, default_topic="", default_queue_size=5, no_delay=False,
                   topic_param=None, queue_size_param=None, header=None, module=None, configurable=False,
                   scope='private', constant=False):
        Adds an initialized subscriber to your parameter struct and parameters for topic and queue size.


For more information on the API, see here: https://gitlab.mrt.uni-karlsruhe.de/MRT/rosinterface_handler/blob/master/doc/HowToWriteYourFirstInterfaceFile.md
"""
from rosinterface_handler.interface_generator_catkin import *

gen = InterfaceGenerator()

# Add a parameter for changing verbosity (=log level) on the fly
gen.add_verbosity_param(configurable=True, default='debug')


# Your Params here
gen.add("input_distance", paramtype='double', description="define a distance to homogenize sample points", default=0.05, min=0, max=0.2, configurable=False, global_scope=False)
gen.add("weight", paramtype='double', description="weight for moving average", default=0.2, min=0, max=1, configurable=False, global_scope=False)
gen.add("output_distance", paramtype='double', description="output distance between points", default=0.02, min=0, max=0.2, configurable=False, global_scope=False)
gen.add("frame_id_map", paramtype='std::string', description="Map frame ID", default="map")
gen.add("bag_file_name", paramtype='std::string', description="File name of rosbag containing /tf record")
gen.add("frame_id_vehicle", paramtype='std::string', description="Vehicle frame ID", default="vehicle")
gen.add("frame_id_camera", paramtype='std::string', description="Top camera frame ID", default="camera_top")
gen.add("frame_id_stargazer", paramtype='std::string', description="Stargazer frame ID", default="stargazer")
gen.add("path_to_map", paramtype='std::string', description="directory to save road map")
gen.add("error_cost", paramtype='double', description="Cornu::Parameters::ERROR_COST", default=700, min=100, max=1000, configurable=False, global_scope=False)
gen.add("points_per_circle", paramtype='double', description="Cornu::Parameters::POINTS_PER_CIRCLE", default=150, min=20, max=500, configurable=False, global_scope=False)
gen.add("curvature_estimate_region", paramtype='double', description="Cornu::Parameters::CURVATURE_ESTIMATE_REGION", default=30, min=0, max=100, configurable=False, global_scope=False)

# Publisher and subscriber (group name will show up in dynamic_reconfigure window)
pub_sub = gen.add_group("Publisher and subscriber")
pub_sub.add_subscriber("dummy_subscriber", message_type="std_msgs::Header", description="example subscriber", default_topic="in_topic", no_delay=True, configurable=True)
pub_sub.add_publisher("dummy_publisher", message_type="std_msgs::Header", description="example publisher", default_topic="out_topic", configurable=True)


# DO NOT TOUCH THIS LINE
#Syntax : Package, Node, Config Name(The final name will be PathGeneratorConfig)
exit(gen.generate("path_generator_ros_tool", "path_generator", "PathGenerator"))
