#!/usr/bin/env python 

PACKAGE = "object_recognition" 
from dynamic_reconfigure.parameter_generator_catkin import * 
gen =ParameterGenerator()

# gen.add( "int_param", int_t, 0, "An Integer parameter", 50, 0, 100) 
# 
gen.add( "apply_cam", bool_t, 0, "apply_cam button ", False)
gen.add( "start", bool_t, 0, "start button ", False)
gen.add( "CLOSE", bool_t, 0, "CLOSE, after close cam ", False)

gen.add( "apply_axis", bool_t, 0, "if apply_axis for origin pointcloud ", True)
gen.add( "axis_filter", double_t,0, "axis_filter size ", 0.18, 0.01, 1.0)

gen.add( "apply_voxel", bool_t, 0, "if grid for  pointcloud ", True)
gen.add( "voxel_size", double_t,0, "voxel_size for grid ", 0.002, 0.0001,0.1)

gen.add( "apply_noplane", bool_t, 0, "apply_noplane or not", True)
gen.add( "keep_organized", bool_t, 0, "if remove the plane point", False)
gen.add( "threshold_plane", double_t, 0, "maximal distance  to be identified as plane", 0.008, 0.001,0.05)

gen.add( "apply_octree", bool_t, 0, "apply_octree or not", False)
gen.add( "reset_octree", bool_t, 0, "reset_octree", False)
gen.add( "resolution", double_t, 0, "resolution", 0.015, 0.001,0.1)
gen.add( "noise_filter", int_t, 0,  "noise_filter", 1, 0,10)

gen.add( "apply_outlier", bool_t, 0, "apply_outlier or not", True)
gen.add( "outlier_meanK", int_t, 0,  "when compute the outlier use the neightbor point", 30, 10,100)
gen.add( "outlier_Thresh", double_t, 0, "outlier_Thresh", 0.1,0.0,10.0)

gen.add( "apply_segrgb", bool_t, 0, "apply_segrgb or not", True)
gen.add( "dist_thre", double_t, 0,  "dist_thre", 3, 0.01,20)
gen.add( "point_color_thre", double_t, 0,  "point_color_thre", 13, 0.1,40)
gen.add( "region_color_thre", double_t, 0,  "region_color_thre", 30, 0.1,40)
gen.add( "min_cluster", int_t, 0,  "min_cluster", 350, 10,1000)

gen.add( "cloud_ss",  double_t, 0, "uniform_sampling.setRadiusSearch (cloud_ss);", 0.005, 0.005,0.05)
gen.add( "output_frame", str_t, 0, "output_frame path for pcd","map")

gen.add( "descr_rad", double_t, 0, "shot.setRadiusSearch (descr_rad);", 0.03, 0.0001,0.5)
gen.add( "apply_shot352", bool_t, 0, "apply_shot352 button ", False)
gen.add( "apply_shot1344", bool_t, 0, "apply_shot1344 button", False)
gen.add( "apply_fpfh", bool_t, 0, "apply_fpfh button", True)

gen.add( "flag_model", bool_t, 0, "flag_model or not", True)
gen.add( "pcd_name_model", int_t, 0,  "pcd_name num for the model", 3, 1, 7)
gen.add( "flag_world", bool_t, 0, "flag_world or not", True)
gen.add( "pcd_name", int_t, 0,  "pcd_name num for name of the world", 12, 1, 30)
gen.add( "flag_world_save", bool_t, 0, "flag_world_save or not", False)

# 
exit(gen.generate(PACKAGE, "object_recognition", "cconfig")) 

# <param name="cloud_ss" value="0.01" />
# <param name="descr_rad" value="0.03" />
# <param name="output_frame" value="map" />
# <param name="apply_voxel" value="true" />
# <param name="voxel_size" value="0.0015" />  
# <param name="apply_noplane" value="true" />
# <param name="keep_organized" value="false" />
# <param name="threshold_plane" value="0.02" />
# <param name="apply_outlier" value="true" />
# <param name="outlier_meanK" value="50" />
# <param name="outlier_Thresh" value="1.0" />-->
