#!/usr/bin/env python 

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

gen.add( "CLOSE", bool_t, 0, "CLOSE, after close cam ", False)

gen.add( "apply_sacia", bool_t, 0, "apply_sacia button ", True)
gen.add( "max_iterations", int_t, 0, "max_iterations button ", 200, 10, 10000)
gen.add( "number_samples", int_t, 0, "number_samples", 20, 2, 60)#20
gen.add( "randomness", int_t, 0, "randomness", 10, 2, 20)#10
gen.add( "max_corr_distance", double_t,0, "e maximum correspondence distance is squared distance;  ", 0.015, 0.00001, 1)
gen.add( "similar_thre", double_t,0, "truncate the error with an upper limit of 0.01 squared. ",  0.9, 0.00001, 2.5)
gen.add( "min_sample_distance", double_t,0, "truncate the error with an upper limit of 0.01 squared. ",  0.25, 0.00001, 5)


gen.add( "apply_icp", bool_t, 0, "apply_icp button ", True)

gen.add( "max_iter_icp", int_t, 0, "max_iter_icp",100000 , 20, 10000000)# large is ok 
gen.add( "max_corr_dist_icp", double_t,0, "max_corr_distance ",  0.08, 0.001, 0.1)# properly large ,not too small 
gen.add( "transformation", double_t,0, "transformation ",  1, 0.1, 1000000)
gen.add( "euclidean_Fitness", double_t,0, "euclidean_Fitness ",  0.001, 0.0001, 10)

gen.add( "apply_FpfhsaciaIcp", bool_t, 0, "apply_FpfhsaciaIcp or not", False)
gen.add( "apply_NDT", bool_t, 0, "apply_NDT or not", False)
gen.add( "apply_RANSAC", bool_t, 0, "apply_RANSAC or not", False)


gen.add( "ndt_maxiteration", int_t, 0, "ndt_maxiteration", 20, 2, 10000000)# large is ok 
gen.add( "ndt_transepsilon", double_t,0, "ndt_transepsilon ",  0.001, 0.000001, 0.1)# properly large ,not too small 
gen.add( "ndt_stepsize", double_t,0, "ndt_stepsize ",  0.1, 0.0001, 1000000)
gen.add( "ndt_resolution", double_t,0, "ndt_resolution ",  1, 0.0001, 30)


# gen.add( "dist_thre", int_t, 0,  "dist_thre", 8, 1,20)
# gen.add( "point_color_thre", int_t, 0,  "point_color_thre", 15, 1,40)
# gen.add( "region_color_thre", int_t, 0,  "region_color_thre", 20, 1,40)
# gen.add( "min_cluster", int_t, 0,  "min_cluster", 250, 10,1000)

# 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.2, 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.001, 0.0001,0.1)

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

# 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)

# apply_fpfh_reco = config.apply_fpfh_reco;
# max_iterations = config.max_iterations;//500
# randomness = config.randomness;/
# number_samples = config.number_samples;//20
# max_correspondence_distance = config.max_corr_distance;//0.01
# ShutDown = config.CLOSE;
# min_sample_distance = config.min_sample_distance;

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

